ByteArrayBuilderLE

inline class ByteArrayBuilderLE(val bab: ByteArrayBuilder)

ByteArrayBuilder variant that writes little-endian values

Constructors

Link copied to clipboard
constructor(bab: ByteArrayBuilder)

Properties

Link copied to clipboard
Link copied to clipboard
val size: Int

Current size of the buffer

Functions

Link copied to clipboard

Appends a byte v to the buffer

fun append(vararg v: Byte)

Appends a sequence vararg of bytes v to the buffer

fun append(vararg v: Int): ByteArrayBuilder

Appends a sequence vararg of bytes v (represented as ints) to the buffer

fun append(array: ByteArray, offset: Int = 0, len: Int = array.size - offset)

Appends a byte array slice (offset and len) to the current buffer

Link copied to clipboard

Appends a byte v to the buffer

Link copied to clipboard
fun clear()

Clears/resets this ByteArrayBuilderLE

Link copied to clipboard

Appends a 32-bit Float v to the buffer in little-endian

Link copied to clipboard

Appends a 64-bit Double v to the buffer in little-endian

Link copied to clipboard

Appends a 16-bit v to the buffer in little-endian

Link copied to clipboard

Appends a 24-bit integer v to the buffer in little-endian

Link copied to clipboard

Appends a 32-bit Int v to the buffer in little-endian

Link copied to clipboard

Appends an 8-bit byte v to the buffer

Link copied to clipboard

Converts this ByteArrayBuilderLE to a ByteArray with the current size