BytesReader class

Reads serialized data from a Uint8List. Throws an OutOfData exception if there is not enough data to read. If there is an error, the offset may be different than before.

Constructors

BytesReader(Uint8List bytes, [int offset = 0])

Properties

atEnd → bool
no setterinherited
bytes → ByteData
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
offset ↔ int
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readInt32() → int
readSlice(int n) → Uint8List
Reads n bytes
readUInt16() → int
readUInt32() → int
readUInt64() → BigInt
Returns a BigInt to ensure that a full 64 unsigned bits are represented. Web targets do not have enough precision and native ints are signed.
readUInt8() → int
readVarInt() → BigInt
readVarSlice() → Uint8List
Reads a varint and then returns a number of bytes equal to that varint
readVector() → List<Uint8List>
Reads a varint that provides the number of slices to read with readVarSlice() and returns then in a list.
toString() → String
A string representation of this object.
inherited

Operators

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