class ByteArrayReader
source · line 7public class ByteArrayReader public constructor(input: List<Byte>)
A cursor over the supplied byte list, with explicit byte order for multibyte values. Reads require enough remaining bytes and advance the cursor.
property position
source · line 17public val position: Long
get: public read-only
The current zero-based byte cursor.
getter get
source · line 17get(): Long
property size
source · line 13public val size: Long
get: public read-only
The total number of bytes in the input.
getter get
source · line 13get(): Long
function readInt32
source · line 91public fun readInt32(order: ByteOrder): Int32
Reads and advances past one Int32 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 91order: ByteOrder
function seek
source · line 31public fun seek(position: Long): Unit
Moves to an absolute byte position between zero and the input size, inclusive.
parameter position
source · line 31position: Long
property remaining
source · line 21public val remaining: Long
get: public read-only
The number of bytes available from the cursor to the end.
getter get
source · line 21get(): Long
function readInt64
source · line 101public fun readInt64(order: ByteOrder): Int64
Reads and advances past one Int64 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 101order: ByteOrder
constructor constructor
source · line 7constructor(input: List<Byte>)
parameter input
source · line 7input: List<Byte>
function readInt8
source · line 72public fun readInt8(): Int8
Reads and advances past one Int8 value as one byte. Insufficient remaining input throws.
function readDouble
source · line 116public fun readDouble(order: ByteOrder): Double
Reads and advances past the IEEE 754 bit representation of a Double value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 116order: ByteOrder
function readUInt16
source · line 86public fun readUInt16(order: ByteOrder): UInt16
Reads and advances past one UInt16 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 86order: ByteOrder
function readUInt64
source · line 106public fun readUInt64(order: ByteOrder): UInt64
Reads and advances past one UInt64 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 106order: ByteOrder
function readUInt8
source · line 76public fun readUInt8(): UInt8
Reads and advances past one UInt8 value as one byte. Insufficient remaining input throws.
function readUInt32
source · line 96public fun readUInt32(order: ByteOrder): UInt32
Reads and advances past one UInt32 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 96order: ByteOrder
function skip
source · line 39public fun skip(count: Long): Unit
Advances by a nonnegative count within the remaining input.
parameter count
source · line 39count: Long
function readFloat
source · line 111public fun readFloat(order: ByteOrder): Float
Reads and advances past the IEEE 754 bit representation of a Float value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 111order: ByteOrder
function readInt16
source · line 81public fun readInt16(order: ByteOrder): Int16
Reads and advances past one Int16 value in the selected byte order. Insufficient remaining input throws.
parameter order
source · line 81order: ByteOrder
function readBytes
source · line 48public fun readBytes(count: Long): Array<Byte>
Copies the requested nonnegative number of bytes and advances the cursor; insufficient input throws.
parameter count
source · line 48count: Long