Uint8ListDataExtension extension
Data Extension for Uint8List.
- on
Properties
- bits → String
-
Returns this bytes as String of bits.
no setter
- bits8 → String
-
Returns this bytes as 8 bits String.
no setter
- bits16 → String
-
Returns this bytes as 16 bits String.
no setter
- bits32 → String
-
Returns this bytes as 32 bits String.
no setter
- bits64 → String
-
Returns this bytes as 64 bits String.
no setter
Methods
-
asByteData(
) → ByteData -
Returns a ByteData of
this
buffer with the respective offset and length. -
bitsPadded(
int width) → String -
Returns this bytes as String of bits of length
width
. -
bytesHashCode(
) → int - Returns a hashcode of this bytes.
-
convertToUint16List(
[Endian endian = Endian.big]) → Uint16List - Converts this instance to an Uint16List.
-
convertToUint32List(
[Endian endian = Endian.big]) → Uint32List - Converts this instance to an Uint32List.
-
convertToUint64List(
[Endian endian = Endian.big]) → Uint64List - Converts this instance to an Uint64List.
-
copy(
) → Uint8List -
Returns a copy of
this
instance. -
copyAsUnmodifiable(
) → Uint8List -
Returns an unmodifiable copy of
this
instance. -
equals(
Uint8List other) → bool -
Returns
true
ofother
elements are equals. -
getInt16(
[int byteOffset = 0]) → int -
Returns a
Int16
atbyteOffset
of this bytes buffer (reads 2 bytes). -
getInt32(
[int byteOffset = 0]) → int -
Returns a
Int32
atbyteOffset
of this bytes buffer (reads 4 bytes). -
getInt64(
[int byteOffset = 0]) → int -
Returns a
Int64
atbyteOffset
of this bytes buffer (reads 8 bytes). -
getInt8(
[int byteOffset = 0]) → int -
Returns a
Int8
atbyteOffset
of this bytes buffer (reads 1 byte). -
getUint16(
[int byteOffset = 0, Endian endian = Endian.big]) → int -
Returns a
Uint16
atbyteOffset
of this bytes buffer (reads 2 bytes). -
getUint32(
[int byteOffset = 0, Endian endian = Endian.big]) → int -
Returns a
Uint32
atbyteOffset
of this bytes buffer (reads 4 bytes). -
getUint64(
[int byteOffset = 0, Endian endian = Endian.big]) → int -
Returns a
Uint64
atbyteOffset
of this bytes buffer (reads 8 bytes). -
getUint8(
[int byteOffset = 0]) → int -
Returns a
Uint8
atbyteOffset
of this bytes buffer (reads 1 byte). -
group(
Uint8List other) → Uint8List -
Groups
this
instance withother
. -
merge(
Uint8List other, int merger(int a, int b, int index)) → Uint8List -
Merges
this
instance withother
using themerger
Function for each byte. -
readBigInt(
[int offset = 0]) → MapEntry< int, BigInt> -
Reads a BigInt at
offset
. SeeBigIntExtension.toBytes
for encoding description. -
readBlock16(
[int offset = 0]) → Uint8List - Reads a bytes block, using a Uint16 prefix (2 bytes of length prefix).
-
readBlock32(
[int offset = 0]) → Uint8List - Reads a bytes block, using a Uint32 prefix (4 bytes of length prefix).
-
readBytes(
[int offset = 0, int? length]) → Uint8List -
Reads bytes (Uint8List) of
length
atoffset
. -
readDateTime(
[int offset = 0]) → DateTime -
Reads a DateTime at
offset
. It's encoded as a Uint64 of DateTime.millisecondsSinceEpoch. -
readWritables<
W extends Writable> (W reader(BytesBuffer input)) → List< W> -
Reads a list of Writable using the
reader
function to instantiate theW
elements. -
reverseBytes(
) → Uint8List -
Returns
this
instance in a reversed order. -
setInt16(
int n, [int byteOffset = 0]) → void -
Sets
n
as aInt16
atbyteOffset
. -
setInt32(
int n, [int byteOffset = 0]) → void -
Sets
n
as aInt32
atbyteOffset
. -
setInt64(
int n, [int byteOffset = 0]) → void -
Sets
n
as aInt64
atbyteOffset
. -
setInt8(
int n, [int byteOffset = 0]) → void -
Sets
n
as aInt8
atbyteOffset
. -
setUint16(
int n, [int byteOffset = 0]) → void -
Sets
n
as aUint16
atbyteOffset
. -
setUint32(
int n, [int byteOffset = 0]) → void -
Sets
n
as aUint32
atbyteOffset
. -
setUint64(
int n, [int byteOffset = 0]) → void -
Sets
n
as aUint64
atbyteOffset
. -
setUint8(
int n, [int byteOffset = 0]) → void -
Sets
n
as aUint8
atbyteOffset
. -
subView(
[int offset = 0, int? length]) → Uint8List -
A sub
Uint8List
view of region. -
subViewTail(
int tailLength) → Uint8List -
A sub
Uint8List
view of the tail. -
tail(
int length) → Uint8List - The tail of this Uint8List instance.
-
toBigInt(
{Endian endian = Endian.big}) → BigInt -
Converts
this
bytes to a BigInt (through toHex). -
toBytesBuffer(
{int offset = 0, int? length, int? bufferLength, bool copyBuffer = false}) → BytesBuffer - Instantiates a BytesBuffer from this Uint8List instance.
-
toHex(
{Endian endian = Endian.big}) → String -
Converts
this
bytes to HEX. -
toHexBigEndian(
) → String -
Converts
this
bytes to HEX (big-endian). -
toHexLittleEndian(
) → String -
Converts
this
bytes to HEX (little-endian). -
toListOfInt16(
) → List< int> -
Converts this bytes to a List of
Int16
. -
toListOfInt32(
) → List< int> -
Converts this bytes to a List of
Int32
. -
toListOfInt64(
) → List< int> -
Converts this bytes to a List of
Int64
. -
toListOfInt8(
) → List< int> -
Converts this bytes to a List of
Int8
. -
toListOfUint16(
) → List< int> -
Converts this bytes to a List of
Uint16
. -
toListOfUint32(
) → List< int> -
Converts this bytes to a List of
Uint32
. -
toListOfUint64(
) → List< int> -
Converts this bytes to a List of
Uint64
. -
toListOfUint8(
) → List< int> -
Converts this bytes to a List of
Uint8
. -
toStringLatin1(
) → String -
Decodes
this
bytes as aLATIN-1
String. -
toStringUTF8(
) → String -
Decodes
this
bytes as aUTF-8
String.
Operators
-
operator &(
Uint8List other) → Uint8List -
Merges
this
instance withother
using theAND
logical operator. -
operator ^(
Uint8List other) → Uint8List -
Merges
this
instance withother
using theXOR
logical operator. -
operator |(
Uint8List other) → Uint8List -
Merges
this
instance withother
using theOR
logical operator.