byteArrayToUnsignedLong

open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>): Long

Converts a byte array to an unsigned long.

Parses the first four bytes of data (big endian) as an unsigned long.

Return

The unsigned long.

Parameters

data

the byte array.


open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int): Long

Converts a byte array to an unsigned long.

Parses the first four bytes of data (big endian) from the offset as an unsigned long.

Return

The unsigned long.

Parameters

data

the byte array.

offset

the offset to start parsing the long.


open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian): Long

Converts a byte array to an unsigned long.

Parses the next four bytes of data (big endian) from the offset as an unsigned long.

Return

The unsigned long.

Parameters

data

the byte array

offset

the offset to start parsing the long

endian

the endianness of the data. (LITTLE or BIG). If null, BIG is assumed


open fun byteArrayToUnsignedLong(data: @NotNull Array<Byte>, offset: Int, @Nullable endian: @Nullable Endian, length: Int): Long

Converts a byte array to an unsigned long.

Return

The unsigned long.

Parameters

data

the byte array.

offset

the offset to start parsing the long.

endian

the endianness of the data. (LITTLE or BIG). If null, BIG is assumed

length

the number of bytes to convert to a long. This number must be between 0 and 4.