toLittleEndian

open fun toLittleEndian(b: Array<Byte>, value: Long, off: Int, length: Int)

Inserts the given value into the array as a little endian sequence of the given length starting at the given offset.

Parameters

b

the array to write into

value

the value to insert

off

the offset into the array that receives the first byte

length

the number of bytes to use to represent the value


open fun toLittleEndian(consumer: ByteUtils.ByteConsumer, value: Long, length: Int)

Provides the given value to the given consumer as a little endian sequence of the given length.

Parameters

consumer

the consumer to provide the bytes to

value

the value to provide

length

the number of bytes to use to represent the value

Throws

if writing fails


open fun toLittleEndian(out: DataOutput, value: Long, length: Int)

Writes the given value to the given stream as a little endian array of the given length.

Parameters

out

the output to write to

value

the value to write

length

the number of bytes to use to represent the value

Throws

if writing fails


open fun toLittleEndian(out: OutputStream, value: Long, length: Int)

Writes the given value to the given stream as a little endian array of the given length.

Parameters

out

the stream to write to

value

the value to write

length

the number of bytes to use to represent the value

Throws

if writing fails