FixedWriteBuffer class Null safety

This provides methods to read and write strings, lists and various sized integers on a buffer (implemented as an integer list).

The ints in the backing list must all be 8-bit values. If larger values are entered, behaviour is undefined.

As per mysql spec, numbers here are all unsigned. Which makes things much easier.

Constructors

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

Properties

byte int
Writes a single byte to the buffer.
write-only
canWriteMore bool
read-only
data Uint8List
final
double_ double
write-only
float double
write-only
hashCode int
The hash code for this object. [...]
read-only, inherited
int16 int
Writes a 16 bit integer to the buffer.
write-only
int32 int
Writes a 32 bit integer to the buffer.
write-only
int64 int
Writes a 64 bit integer to the buffer.
write-only
length int
Returns the size of the buffer
read-only
nullTerminatedList List<int>
Writes a null terminated list of ints from the buffer. The given list should not contain the terminating zero.
write-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
uint16 int
Writes a 16 bit integer to the buffer.
write-only
uint24 int
Writes a 24 bit integer to the buffer.
write-only
uint32 int
Writes a 32 bit integer to the buffer.
write-only
uint64 int
Writes a 64 bit integer to the buffer.
write-only

Methods

fill(int numberOfBytes, int value) → void
Fills the next numberOfBytes with the given value
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reset() → void
resetWrite() → void
Resets the read and write positions markers to the start of the buffer.
seekWrite(int position) → void
Moves the write marker to the given position
skipWrite(int numberOfBytes) → void
Moves the write marker forwards by the given numberOfBytes
toString() String
A string representation of this object. [...]
inherited
writeLengthCodedBinary(int value) → void
Will write a length coded binary value, once implemented!
writeList(List<int> list) → void
Writes the give list of bytes to the buffer.

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited
operator []=(int index, dynamic value) → void
Sets the int at the specified index to the given value