ByteStruct<K extends ByteField<NativeType>> extension type

ByteStruct is a TypedData with keyed/named access to fields. TypedData + [] Map operators returning int keyed view mixin keyed access for serialization map

Wrapper over extension type. see StructData view ByteData or ByteStruct subtypes as base type. sufficent for iterative access.

on
Implemented types
Available extensions

Constructors

ByteStruct(ByteData _this)
const

Properties

buffer ByteBuffer
The byte buffer associated with this object.
no setterinherited
elementSizeInBytes int
The number of bytes in the representation of each element in this list.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
length int
no setter
length int

Available on TypedData, provided by the TypedDataLength extension

no setter
lengthInBytes int
The length of this view, in bytes.
no setterinherited
offsetInBytes int
The offset of this view into the underlying byte buffer, in bytes.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toJS JSDataView

Available on ByteData, provided by the ByteDataToJSDataView extension

Converts this ByteData to a JSDataView by either casting, unwrapping, or cloning the ByteData.
no setter

Methods

arrayAt<T extends TypedDataList<int>>([int offset = 0, int? length]) → T

Available on ByteData, provided by the ByteDataArrayAccess extension

offsetInBytes length using parameter T type size
arrayOrNullAt<T extends TypedDataList<int>>([int offset = 0, int? length]) → T?

Available on ByteData, provided by the ByteDataArrayAccess extension

asByteData([int offsetInBytes = 0, int? length]) ByteData

Available on TypedData, provided by the TypedDataCast extension

asTypedIntList<T extends TypedDataList<int>>([int offsetInBytes = 0, int? length]) → T

Available on TypedData, provided by the TypedDataCast extension

asUnmodifiableView() ByteData
A read-only view of this ByteData.
inherited
field(K key) StructField<K, int>
inherited
fieldAs<R>(Field<R> key) StructField<Field<R>, R>
inherited
fieldOrNull(K key) int?
inherited
fieldsAs(StructForm<K, int> type) Iterable<StructField<K, int>>
inherited
getFloat32(int byteOffset, [Endian endian = Endian.big]) double
The floating point number represented by the four bytes at the specified byteOffset in this object, in IEEE 754 single-precision binary floating-point format (binary32).
inherited
getFloat64(int byteOffset, [Endian endian = Endian.big]) double
The floating point number represented by the eight bytes at the specified byteOffset in this object, in IEEE 754 double-precision binary floating-point format (binary64).
inherited
getInt16(int byteOffset, [Endian endian = Endian.big]) int
The (possibly negative) integer represented by the two bytes at the specified byteOffset in this object, in two's complement binary form.
inherited
getInt32(int byteOffset, [Endian endian = Endian.big]) int
The (possibly negative) integer represented by the four bytes at the specified byteOffset in this object, in two's complement binary form.
inherited
getInt64(int byteOffset, [Endian endian = Endian.big]) int
The (possibly negative) integer represented by the eight bytes at the specified byteOffset in this object, in two's complement binary form.
inherited
getInt8(int byteOffset) int
The (possibly negative) integer represented by the byte at the specified byteOffset in this object, in two's complement binary representation.
inherited
getUint16(int byteOffset, [Endian endian = Endian.big]) int
The positive integer represented by the two bytes starting at the specified byteOffset in this object, in unsigned binary form.
inherited
getUint32(int byteOffset, [Endian endian = Endian.big]) int
The positive integer represented by the four bytes starting at the specified byteOffset in this object, in unsigned binary form.
inherited
getUint64(int byteOffset, [Endian endian = Endian.big]) int
The positive integer represented by the eight bytes starting at the specified byteOffset in this object, in unsigned binary form.
inherited
getUint8(int byteOffset) int
The positive integer represented by the byte at the specified byteOffset in this object, in unsigned binary form.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setFloat32(int byteOffset, double value, [Endian endian = Endian.big]) → void
Sets the four bytes starting at the specified byteOffset in this object to the IEEE 754 single-precision binary floating-point (binary32) representation of the specified value.
inherited
setFloat64(int byteOffset, double value, [Endian endian = Endian.big]) → void
Sets the eight bytes starting at the specified byteOffset in this object to the IEEE 754 double-precision binary floating-point (binary64) representation of the specified value.
inherited
setInt16(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the two bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in two bytes.
inherited
setInt32(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the four bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in four bytes.
inherited
setInt64(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the eight bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in eight bytes.
inherited
setInt8(int byteOffset, int value) → void
Sets the byte at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in a single byte.
inherited
setUint16(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the two bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in two bytes.
inherited
setUint32(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the four bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in four bytes.
inherited
setUint64(int byteOffset, int value, [Endian endian = Endian.big]) → void
Sets the eight bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in eight bytes.
inherited
setUint8(int byteOffset, int value) → void
Sets the byte at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in a single byte.
inherited
setWordAt<R extends NativeType>(int byteOffset, int value, [Endian endian = Endian.little]) → void

Available on ByteData, provided by the ByteDataWordAccess extension

setWordOrNotAt<R extends NativeType>(int byteOffset, int value, [Endian endian = Endian.little]) bool

Available on ByteData, provided by the ByteDataWordAccess extension

testLength(int offset, int length) bool

Available on ByteData, provided by the ByteDataArrayAccess extension

this.length
toInt([Endian endian = Endian.little]) int

Available on TypedData, provided by the TypedDataToInt extension

toInt([Endian endian = Endian.little]) int

Available on ByteData, provided by the SizedWord extension

toMapWith(StructForm<K, int> type) Map<K, int>
inherited
toString() String
A string representation of this object.
inherited
trimLeading(int targetLength) ByteData

Available on ByteData, provided by the SizedWord extension

trimTrailing(int targetLength) ByteData

Available on ByteData, provided by the SizedWord extension

trimWord(int wordLength, Endian endian) ByteData

Available on ByteData, provided by the SizedWord extension

trySetField(K key, int value) bool
inherited
typedSlices(int sliceLength) Iterable<T>

Available on T, provided by the TypedDataSlices extension

valueAt(int byteOffset, int size, [Endian endian = Endian.little]) int

Available on ByteData, provided by the SizedWord extension

Word value for intervals not of pow2, e.g. 3 bytes, 5 bytes
valuesAs(StructForm<K, int> type) Iterable<int>
inherited
wordAt<R extends NativeType>(int byteOffset, [Endian endian = Endian.little]) int

Available on ByteData, provided by the ByteDataWordAccess extension

valueAt by type, alternatively specify sign and size throws range error
wordOrNullAt<R extends NativeType>(int byteOffset, [Endian endian = Endian.little]) int?

Available on ByteData, provided by the ByteDataWordAccess extension

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](K key) int
inherited
operator []=(K key, int value) → void
inherited