InputStream class

A buffer that can be read as a stream of bytes

Inheritance

Constructors

InputStream(dynamic data, {int byteOrder: LITTLE_ENDIAN, int start: 0, int length})
Create a InputStream for reading from a List
InputStream.from(InputStream other)
Create a copy of other.

Properties

buffer List<int>
final
byteOrder int
final
isEOS bool
Is the current position at the end of the stream?
read-only, override
length int
How many bytes are left in the stream.
read-only, override
offset int
read / write
position int
The current read position relative to the start of the buffer.
read-only, override
start int
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

indexOf(int value, [int offset = 0]) int
Returns the position of the given value within the buffer, starting from the current read position with the given offset. The position returned is relative to the start of the buffer, or -1 if the value was not found.
peekBytes(int count, [int offset = 0]) InputStream
Read count bytes from an offset of the current read position, without moving the read position.
override
readByte() int
Read a single byte.
override
readBytes(int count) InputStream
Read count bytes from the stream.
override
readString({int size, bool utf8: true}) String
Read a null-terminated string, or if len is provided, that number of bytes returned as a string.
override
readUint16() int
Read a 16-bit word from the stream.
override
readUint24() int
Read a 24-bit word from the stream.
override
readUint32() int
Read a 32-bit word from the stream.
override
readUint64() int
Read a 64-bit word form the stream.
override
reset() → void
Reset to the beginning of the stream.
override
rewind([int length = 1]) → void
Rewind the read head of the stream by the given number of bytes.
override
skip(int count) → void
Move the read position by count bytes.
override
subset([int position, int length]) 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.
toUint8List() Uint8List
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator [](int index) int
Access the buffer relative from the current position.
operator ==(dynamic other) bool
The equality operator. [...]
inherited