getLong

fun getLong(index: Int): Long

Absolute get method for reading a long value.

Reads eight bytes starting at index and composes them into a long value according to the current byte order. The index is in byte units.

Return

The long value at the given index.

Parameters

index

The index from which the long will be read.

Throws

if there are fewer than 8 bytes available starting at index.


fun getLong(): Long

Relative get method for reading a long value.

Reads the next eight bytes at this buffer's current position, composing them into a long value according to the current byte order, and then increments the position by eight.

Return

The long value at the current position.

Throws

If there are fewer than eight bytes remaining in this buffer.