BufferWriter class

Buffer Writer

Constructors

BufferWriter(int length, {bool growable = false})
Creates a zero initialized buffer of size length that maintains its offset position while writing data to the buffer.
BufferWriter.mutable([int length = defaultMutableLength])
Creates a resizable BufferWriter with an initial length.
factory

Properties

buffer Buffer
The buffer to write to.
getter/setter pair
growable bool
If true, dynamically increase the size of the buffer as needed.
final
hashCode int
The hash code for this object.
no setterinherited
length int
The capacity.
no setter
offset int
The current offset.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBigInt(BigInt value, int length) → void
setBigUint(BigInt value, int length) → void
setBool(bool value) → void
setBuffer(Iterable<int> value) → void
Writes a byte array to a region of buffer starting at offset. The internal offset is advanced by value length.
setDateTime(DateTime value) → void
setFloat32(double value) → void
setFloat64(double value) → void
setInt(int value, int length) → void
setInt128(BigInt value) → void
setInt16(int value) → void
setInt32(int value) → void
setInt64(int value) → void
setInt8(int value) → void
setString(String value, [BufferEncoding encoding = BufferEncoding.utf8]) → void
setUint(int value, int length) → void
setUint128(BigInt value) → void
setUint16(int value) → void
setUint32(int value) → void
setUint64(BigInt value) → void
setUint8(int value) → void
toBuffer({required bool slice}) Buffer
If slice == true the returned buffer is resized to the current offset.
toString() String
A string representation of this object.
override

Operators

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

Constants

defaultMutableLength → const int
The default length of a mutable buffer.