ByteArray class

Read and write to an array of bytes


ByteArray([int length = 0, Endian endian = Endian.little])
ByteArray.fromBuffer(ByteBuffer buffer, [int offset = 0, int length = null, Endian endian = Endian.little])
ByteArray.fromByteData(ByteData _byteData, [Endian endian = Endian.little])


buffer ByteBuffer
bytesAvailable int
endian Endian
read / write
hashCode int
The hash code for this object. [...]
read-only, override
length int
offset int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


byteStream() Iterable<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
readBoolean() bool
Returns true if not equal to zero
readByte() int
readDouble() double
readFloat() double
readInt() int
readLong() int
readShort() int
readUnsignedByte() int
readUnsignedInt() int
readUnsignedLong() int
readUnsignedShort() int
toString() String
Returns a string representation of this object.
writeBoolean(bool value) → void
Writes int, 1 if true, zero if false
writeByte(int value) → void
writeBytes(ByteArray bytes, [int offset = 0, int byteCount = 0]) → void
Copies bytes from bytes to this
writeDouble(double value) → void
writeFloat(double value) → void
writeInt(int value) → void
writeLong(int value) → void
writeShort(int value) → void
writeUnsignedByte(int value) → void
writeUnsignedInt(int value) → void
writeUnsignedLong(int value) → void
writeUnsignedShort(int value) → void


operator +(ByteArray other) ByteArray
Appends other to this
operator ==(Object otherObject) bool
Returns true if every byte in both ByteArrays are equal Note: offsets will not be affected
operator [](int i) int
Get byte at given index
operator []=(int i, int value) → void
Set byte at given index