getLong

fun ByteArray.getLong(offset: Int, order: ByteOrder = ByteOrder.BIG_ENDIAN): Long

Returns a Long from a byte array with a given offset.

Return

Long.

Parameters

offset

The index to start from.

order

The byte order, default is ByteOrder.BIG_ENDIAN.

Throws

If the length of byte array is less than the offset plus Long.SIZE_BYTES.