BytesBuilder class abstract interface

Builds a list of bytes, allowing bytes and lists of bytes to be added at the end.

Used to efficiently collect bytes and lists of bytes.


BytesBuilder({bool copy = true})
Construct a new empty BytesBuilder.


hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the buffer is empty.
no setter
isNotEmpty bool
Whether the buffer is non-empty.
no setter
length int
The number of bytes in this builder.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


add(List<int> bytes) → void
Appends bytes to the current contents of this builder.
addByte(int byte) → void
Appends byte to the current contents of this builder.
clear() → void
Clears the contents of this builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
takeBytes() Uint8List
Returns the bytes currently contained in this builder and clears it.
toBytes() Uint8List
Returns a copy of the current byte contents of this builder.
toString() String
A string representation of this object.


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