InputStream class abstract

Implementers

Constructors

InputStream({required ByteOrder byteOrder})

Properties

byteOrder ByteOrder
The current endian order if the stream.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isEOS bool
Is the current position at the end of the stream?
no setter
length int
How many bytes are left in the stream.
no setter
position int
The current read position relative to the start of the buffer.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Asynchronously closes the input stream.
closeSync() → void
Synchronously closes the input stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() bool
peekBytes(int count, {int offset = 0}) InputStream
Read count bytes from an offset of the current read position, without moving the read position.
readByte() int
Read a single byte.
readBytes(int count) InputStream
Read count bytes from the stream.
readString({int? size, bool utf8 = true}) String
Read a null-terminated string, or if size is provided, that number of bytes returned as a string.
readUint16() int
Read a 16-bit word from the stream.
readUint24() int
Read a 24-bit word from the stream.
readUint32() int
Read a 32-bit word from the stream.
readUint64() int
Read a 64-bit word form the stream.
readUint8() int
Read a single byte.
reset() → void
Reset to the beginning of the stream.
rewind([int length = 1]) → void
Rewind the read head of the stream by the given number of bytes.
setPosition(int v) → void
skip(int length) → void
Move the read position by length bytes.
subset({int? position, int? length, int? bufferSize}) InputStream
Return a InputStream to read a subset of this stream. It does not move the read position of this stream. position is specified relative to the start of the buffer. If position is not specified, the current read position is used. If length is not specified, the remainder of this stream is used. If bufferSize is provided, and this is an InputFileStream, the returned InputStream will get its own FileBuffer with the given bufferSize, otherwise it will share the FileBuffer of this InputFileStream.
toString() String
A string representation of this object.
inherited
toUint8List() Uint8List
Convert the remaining bytes to a Uint8List.

Operators

operator ==(Object other) bool
The equality operator.
inherited