LayoutByteWriter class
A utility class for writing layout bytes dynamically.
Constructors
- LayoutByteWriter(int span)
-
Creates a writer. A negative
spanstarts an empty, growable buffer.
Properties
- growable → bool
-
Whether the buffer grows on demand (span was unknown/negative).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- last → int
-
The last byte in the tracked buffer.
no setter
- length → int
-
Number of bytes currently in the buffer.
no setter
- reader → LayoutByteReader
-
Read-only view of the buffer written so far.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
at(
int pos) → int -
Returns the byte at
pos. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
int offset, int value) → int -
Writes an unsigned 8-bit integer at
offset. -
setAll(
int index, List< int> bytes) → int -
Writes
bytesstarting atindex; grows the buffer if needed. -
setI16Be(
int offset, int value) → int -
setI32Be(
int offset, int value) → int -
setI64Be(
int offset, BigInt value) → int -
setU16Be(
int offset, int value) → int -
Writes a big-endian unsigned 16-bit integer at
offset. -
setU32Be(
int offset, int value) → int -
Writes a big-endian unsigned 32-bit integer at
offset. -
setU64Be(
int offset, BigInt value) → int -
Writes a big-endian unsigned 64-bit integer at
offset. -
sublist(
int start, int end) → BuBytes -
Returns the byte range
[start, end). -
toBytes(
) → BuBytes - Returns the full buffer contents.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited