ReadBuffer class

Constructors

ReadBuffer(int size)
Creates a Buffer of the given size
ReadBuffer.fromList(List<int> list)
Creates a Buffer with the given list as backing storage
factory
ReadBuffer.fromUint8List(Uint8List list)

Properties

byte int
Returns a single byte, read from the buffer.
no setter
canReadMore bool
Returns true if more data can be read from the buffer, false otherwise.
no setter
currentPos int
no setter
data Uint8List
final
double_ double
no setter
float double
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMore bool
no setter
int8 int
Returns a single byte, read from the buffer.
no setter
int16 int
Returns a 16-bit integer, read from the buffer
no setter
int32 int
Returns a 32-bit integer, read from the buffer.
no setter
int64 int
Returns a 64-bit integer, read from the buffer.
no setter
length int
no setter
nullTerminatedList List<int>
Reads a null terminated list of ints from the buffer. Returns the list of ints from the buffer, without the terminating zero.
no setter
nullTerminatedUtf8String String
Reads a null terminated string from the buffer. Returns the string, without a terminating null.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringToEnd String
Reads a string from the buffer, terminating when the end of the buffer is reached.
no setter
uint8 int
Returns a single byte, read from the buffer.
no setter
uint16 int
Returns a 16-bit integer, read from the buffer
no setter
uint24 int
Returns a 24-bit integer, read from the buffer.
no setter
uint32 int
Returns a 32-bit integer, read from the buffer.
no setter
uint64 int
Returns a 64-bit integer, read from the buffer.
no setter

Methods

doubles(int length) List<double>
floats(int length) List<double>
int16s(int length) List<int>
int32s(int length) List<int>
int8s(int length) List<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullTerminatedString(Encoding encoding) String
readLengthCodedBinary() int?
Reads a length coded binary from the buffer. This is specified in the mysql docs. It will read up to nine bytes from the stream, depending on the first byte. Returns an unsigned integer.
readLengthCodedString() String?
Returns a length coded string, read from the buffer.
readList(int numberOfBytes) List<int>
Returns a list of the given numberOfBytes, read from the buffer.
readString(int length) String
Reads a string of the given length from the buffer.
reset() → void
resetRead() → void
Resets the read and write positions markers to the start of the buffer.
seek(int position) → void
Moves the read marker to the given position
skip(int numberOfBytes) → void
Moves the read marker forwards by the given numberOfBytes
string(int length) String
Reads a string of the given length from the buffer.
toString() String
A string representation of this object.
inherited
uint16s(int length) List<int>
uint32s(int length) List<int>
uint8s(int length) List<int>

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) int
Returns the int at the specified index

Static Methods

measureLengthCodedBinary(int value) int