ByteDataWriter class
A class for building byte arrays with a BytesBuffer and a fixed-length work buffer.
Allows for the incremental building of a byte array using write*() methods. The arrays are concatenated to a single byte array only when toBytes is called.
Constructors
- ByteDataWriter.new({int bufferLength = 128, Endian endian = Endian.big})
Properties
- bufferLength ↔ int
-
getter/setter pair
- endian → Endian
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toBytes(
) → Uint8List - Concatenate the byte arrays and return them as a single unit.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
List< int> bytes, {bool copy = false}) → void -
writeFloat32(
double value, [Endian? endian]) → void -
writeFloat64(
double value, [Endian? endian]) → void -
writeInt(
int byteLength, int value, [Endian? endian]) → void -
writeInt16(
int value, [Endian? endian]) → void -
writeInt32(
int value, [Endian? endian]) → void -
writeInt64(
int value, [Endian? endian]) → void -
writeInt8(
int value) → void -
writeUint(
int byteLength, int value, [Endian? endian]) → void -
writeUint16(
int value, [Endian? endian]) → void -
writeUint32(
int value, [Endian? endian]) → void -
writeUint64(
int value, [Endian? endian]) → void -
writeUint8(
int value) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited