tuweni / org.apache.tuweni.bytes / Bytes / getInt

getInt

open fun getInt(i: Int): Int (source)

Retrieve the 4 bytes starting at the provided index in this value as an integer.

Parameters

i - Int: The index from which to get the int, which must less than or equal to size() - 4.

Exceptions

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

Return
Int: An integer whose value is the 4 bytes from this value starting at index i.

open fun getInt(i: Int, order: ByteOrder!): Int (source)

Retrieve the 4 bytes starting at the provided index in this value as an integer.

Parameters

i - Int: The index from which to get the int, which must less than or equal to size() - 4.

order - ByteOrder!: The byte-order for decoding the integer.

Exceptions

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

Return
Int: An integer whose value is the 4 bytes from this value starting at index i.