BytesBuffer class Null safety

A class for concatenating byte arrays efficiently.

Allows for the incremental building of a byte array using add*() methods. The arrays are concatenated to a single byte array only when toBytes is called.

Constructors

BytesBuffer({bool copy = false})

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
length int
The total length of the buffer.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

add(List<int> bytes, {bool? copy}) → void
Add a byte array to the buffer. [...]
addByte(int byte) → void
Add a single byte to the buffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toBytes({bool? copy}) Uint8List
Concatenate the byte arrays and return them as a single unit.
toString() String
A string representation of this object. [...]
inherited

Operators

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