fromLittleEndian

open fun fromLittleEndian(bytes: Array<Byte>): Long

Reads the given byte array as a little endian long.

Return

the number read

Parameters

bytes

the byte array to convert


open fun fromLittleEndian(bytes: Array<Byte>, off: Int, length: Int): Long

Reads the given byte array as a little endian long.

Return

the number read

Parameters

bytes

the byte array to convert

off

the offset into the array that starts the value

length

the number of bytes representing the value

Throws

if len is bigger than eight


open fun fromLittleEndian(supplier: ByteUtils.ByteSupplier, length: Int): Long

Reads the given number of bytes from the given supplier as a little endian long.

Typically used by our InputStreams that need to count the bytes read as well.

Return

the number read

Parameters

supplier

the supplier for bytes

length

the number of bytes representing the value

Throws

if len is bigger than eight

if the supplier fails or doesn't supply the given number of bytes anymore


open fun fromLittleEndian(in: DataInput, length: Int): Long

Reads the given number of bytes from the given input as little endian long.

Return

the number read

Parameters

in

the input to read from

length

the number of bytes representing the value

Throws

if len is bigger than eight

if reading fails or the stream doesn't contain the given number of bytes anymore


open fun fromLittleEndian(in: InputStream, length: Int): Long

Reads the given number of bytes from the given stream as a little endian long.

Return

the number read

Parameters

in

the stream to read from

length

the number of bytes representing the value

Throws

if len is bigger than eight

if reading fails or the stream doesn't contain the given number of bytes anymore