toInt

Converts a 4-byte array to an Int.

Return

Int.

Throws

If the length of byte array is not 4.


fun ByteArray.toInt(offset: Int): Int

Returns an Int from a byte array with a given offset.

Return

Int.

Parameters

offset

The index to start from.

Throws

If the length of byte array is not >= offset + 4.