Skip to content
Select language:English

MCL 1.3.5

Converts a Short to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the Short.


Converts a UShort to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the UShort.


Converts an Int to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the Int.


Converts a UInt to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the UInt.


Converts a Long to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the Long.


Converts a ULong to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the ULong.


Converts a Float to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the Float.


Converts a Double to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the Double.


fun ShortArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ShortArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun UShortArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UShortArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun IntArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this IntArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun UIntArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this UIntArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun LongArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this LongArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun ULongArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this ULongArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun FloatArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this FloatArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.


fun DoubleArray.toByteArrayBE(start: Int = 0, stop: Int = size): ByteArray

Converts a range of this DoubleArray to a ByteArray in big-endian byte order.

Return

The ByteArray representation of the selected values.

Parameters

start

Index of the first value to encode.

stop

Exclusive index after the last value to encode.