class ByteArrayBuilder
source · line 7public class ByteArrayBuilder public constructor()
A growable in-memory byte accumulator. Byte-array conversions return independent copies; clear resets the logical size for reuse.
function append
source · line 40public fun append(value: List<Byte>): ByteArrayBuilder
Appends the supplied byte or byte sequence and returns this builder.
parameter value
source · line 40value: List<Byte>
function writeInt64
source · line 107public fun writeInt64(value: Int64, order: ByteOrder): Unit
Appends one Int64 value in the selected byte order.
parameter order
source · line 107order: ByteOrder
parameter value
source · line 107value: Int64
function toMutableByteArray
source · line 67public fun toMutableByteArray(): MutableArray<Byte>
Copies the accumulated bytes into an independent mutable array.
function writeFloat
source · line 115public fun writeFloat(value: Float, order: ByteOrder): Unit
Appends the IEEE 754 bit representation of a Float value in the selected byte order.
parameter order
source · line 115order: ByteOrder
parameter value
source · line 115value: Float
function writeUInt8
source · line 87public fun writeUInt8(value: UInt8): Unit
Appends one UInt8 value as one byte.
parameter value
source · line 87value: UInt8
function writeInt16
source · line 91public fun writeInt16(value: Int16, order: ByteOrder): Unit
Appends one Int16 value in the selected byte order.
parameter order
source · line 91order: ByteOrder
parameter value
source · line 91value: Int16
function writeInt32
source · line 99public fun writeInt32(value: Int32, order: ByteOrder): Unit
Appends one Int32 value in the selected byte order.
parameter order
source · line 99order: ByteOrder
parameter value
source · line 99value: Int32
function writeDouble
source · line 119public fun writeDouble(value: Double, order: ByteOrder): Unit
Appends the IEEE 754 bit representation of a Double value in the selected byte order.
parameter value
source · line 119value: Double
parameter order
source · line 119order: ByteOrder
constructor constructor
source · line 7constructor()
function toByteArray
source · line 63public fun toByteArray(): Array<Byte>
Copies the accumulated bytes into a read-only array.
function writeUInt32
source · line 103public fun writeUInt32(value: UInt32, order: ByteOrder): Unit
Appends one UInt32 value in the selected byte order.
parameter order
source · line 103order: ByteOrder
parameter value
source · line 103value: UInt32
function writeInt8
source · line 83public fun writeInt8(value: Int8): Unit
Appends one Int8 value as one byte.
parameter value
source · line 83value: Int8
property size
source · line 13public val size: Long
get: public read-only
The number of accumulated bytes.
getter get
source · line 13get(): Long
function writeUInt64
source · line 111public fun writeUInt64(value: UInt64, order: ByteOrder): Unit
Appends one UInt64 value in the selected byte order.
parameter value
source · line 111value: UInt64
parameter order
source · line 111order: ByteOrder
function append
source · line 30public fun append(value: Byte): ByteArrayBuilder
Appends the supplied byte or byte sequence and returns this builder.
parameter value
source · line 30value: Byte
function clear
source · line 54public fun clear(): Unit
Removes all accumulated bytes while retaining reusable storage.
function writeUInt16
source · line 95public fun writeUInt16(value: UInt16, order: ByteOrder): Unit
Appends one UInt16 value in the selected byte order.
parameter value
source · line 95value: UInt16
parameter order
source · line 95order: ByteOrder