ByteDataReader class
A class for parsing byte arrays.
Allows incremental building of the input byte stream using the add() method. The input arrays are concatenated as needed.
Constructors
- ByteDataReader({Endian endian = Endian.big, bool copy = false})
Properties
- endian → Endian
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- offsetInBytes → int
-
The offset in bytes (the current position).
no setter
- remainingLength → int
-
The number of bytes available to read.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
List< int> bytes, {bool? copy}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
int length, {bool? copy}) → Uint8List -
readAhead(
int length) → Future -
Completes when minimum
length
amount of bytes are in the buffer. -
readFloat32(
[Endian? endian]) → double -
readFloat64(
[Endian? endian]) → double -
readInt(
int byteLength, [Endian? endian]) → int -
readInt16(
[Endian? endian]) → int -
readInt32(
[Endian? endian]) → int -
readInt64(
[Endian? endian]) → int -
readInt8(
) → int -
readUint(
int byteLength, [Endian? endian]) → int -
readUint16(
[Endian? endian]) → int -
readUint32(
[Endian? endian]) → int -
readUint64(
[Endian? endian]) → int -
readUint8(
) → int -
readUntilTerminatingByte(
int value, {bool? copy, bool include = false}) → Uint8List -
Reads the buffer until the terminating
value
is reached (e.g. null-terminated bytes). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited