tuweni / org.apache.tuweni.bytes / Bytes / getLong

getLong

open fun getLong(i: Int): Long (source)

Retrieves the 8 bytes starting at the provided index in this value as a long.

Parameters

i - The index from which to get the long, which must less than or equal to size() - 8.

Exceptions

IndexOutOfBoundsException - if i < 0 or i > size() - 8.

Return
A long whose value is the 8 bytes from this value starting at index i.

open fun getLong(i: Int, order: ByteOrder): Long (source)

Retrieves the 8 bytes starting at the provided index in this value as a long.

Parameters

i - The index from which to get the long, which must less than or equal to size() - 8.

order - The byte-order for decoding the integer.

Exceptions

IndexOutOfBoundsException - if i < 0 or i > size() - 8.

Return
A long whose value is the 8 bytes from this value starting at index i.