BinaryWriter class Null safety

The BinaryWriter is used to encode data to the binary format.

Constructors

BinaryWriter()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
write<T>(T value, {bool writeTypeId = true}) → void
Write any value.
writeBool(bool value) → void
Write a boolean.
writeBoolList(List<bool> list, {bool writeLength = true}) → void
Write a list of booleans.
writeByte(int byte) → void
Write a single byte.
writeByteList(List<int> bytes, {bool writeLength = true}) → void
Write a list of bytes.
writeDouble(double value) → void
Write a 64-bit double as eight bytes.
writeDoubleList(List<double> list, {bool writeLength = true}) → void
Write a list of doubles.
writeHiveList(HiveList<HiveObjectMixin> list, {bool writeLength = true}) → void
Write a HiveList.
writeInt(int value) → void
Write a 64-bit signed integer as eight bytes.
writeInt32(int value) → void
Write a 32-bit signed integer as four bytes.
writeIntList(List<int> list, {bool writeLength = true}) → void
Write a list of integers.
writeList(List list, {bool writeLength = true}) → void
Write a list.
writeMap(Map map, {bool writeLength = true}) → void
Write a map.
writeString(String value, {bool writeByteCount = true, Converter<String, List<int>> encoder = utf8Encoder}) → void
Encode the UTF-8 String value and write its bytes.
writeStringList(List<String> list, {bool writeLength = true, Converter<String, List<int>> encoder = utf8Encoder}) → void
Write a list of Strings.
writeUint32(int value) → void
Write a 32-bit unsigned integer as four bytes.
writeWord(int value) → void
Write a 16-bit unsigned integer as two bytes.

Operators

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

Constants

utf8Encoder → const Utf8Encoder
The UTF-8 encoder is used to encode Strings.