decodeUInt

fun ByteArray.decodeUInt(octetIndex: Int, byteOrder: ByteOrder): UInt

Converts ByteArray to UInt

Return

the decoded UInt

Parameters

octetIndex

index of byte to start. Must not be higher than the fourth to last octet.

byteOrder

ByteOrder to use for decoding.

Throws

if octetIndex is bigger than the size of the ByteArray minus 4.