WriteBuffer class Null safety

Write-only buffer for incrementally building a ByteData instance.

A WriteBuffer instance can be used only once. Attempts to reuse will result in StateErrors being thrown.

The byte order used is Endian.host throughout.

Constructors

WriteBuffer({int startCapacity = 8})
Creates an interface for incrementally building a ByteData instance. startCapacity determines the start size of the WriteBuffer in bytes. The closer that value is to the real size used, the better the performance.
factory

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

done() ByteData
Finalize and return the written ByteData.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
putFloat32List(Float32List list) → void
Write all the values from a Float32List into the buffer.
putFloat64(double value, {Endian? endian}) → void
Write an Float64 into the buffer.
putFloat64List(Float64List list) → void
Write all the values from a Float64List into the buffer.
putInt32(int value, {Endian? endian}) → void
Write an Int32 into the buffer.
putInt32List(Int32List list) → void
Write all the values from an Int32List into the buffer.
putInt64(int value, {Endian? endian}) → void
Write an Int64 into the buffer.
putInt64List(Int64List list) → void
Write all the values from an Int64List into the buffer.
putUint16(int value, {Endian? endian}) → void
Write a Uint16 into the buffer.
putUint32(int value, {Endian? endian}) → void
Write a Uint32 into the buffer.
putUint8(int byte) → void
Write a Uint8 into the buffer.
putUint8List(Uint8List list) → void
Write all the values from a Uint8List into the buffer.
toString() String
A string representation of this object.
inherited

Operators

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