BinaryWriter class

Constructors

BinaryWriter({int alignment = 1024, Endian endian = Endian.little})

Properties

alignment → int
no setter
buffer → ByteData
no setter
endian → Endian
final
hashCode → int
The hash code for this object.
no setterinherited
maxSize → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
no setter
uint8Buffer → Uint8List
no setter
writeIndex ↔ int
getter/setter pair

Methods

nextAlignment(int length) → int
Return the smallest multiple of _alignment that fits data of length
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
write(Uint8List bytes, [int? length]) → void
Write bytes into the buffer. Optional length to write a specific number of bytes, otherwise the length from bytes is used.
writeFloat32(double value) → void
writeFloat64(double value) → void
writeInt16(int value) → void
writeInt32(int value) → void
writeInt64(int value) → void
writeInt8(int value) → void
writeString(String value, {bool explicitLength = true}) → void
Encode a string into the buffer. Strings are encoded with a varuint integer length written first followed by length number of utf8 encoded bytes.
writeUint16(int value) → void
writeUint32(int value) → void
writeUint64(int value) → void
writeUint8(int value) → void
writeVarUint(int value) → void
Write an integer as a list of bytes that contain an LEB128 unsigned integer. The size of the integer is decided automatically.

Operators

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