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.

Constructors

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

Properties

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

Methods

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.
inherited
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.
inherited

Operators

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