decodeInt40

fun ByteArray.decodeInt40(octetIndex: Int, byteOrder: ByteOrder): Int40

Decodes a ByteArray into an Int40 using the 5 bytes starting from octetIndex

Return

the decoded Int40

Parameters

octetIndex

the the index of the octet start the decoding from. Must be be at most the fifth to last octet

byteOrder

the ByteOrder in which the Int40 is encoded

Throws

if octetIndex or its next four octets are not available in the ByteArray