ByteArrayBuilder
Builds a ByteArray from primary types
Properties
The ByteOrder in which the array is built. If ByteOrder.MOST_SIGNIFICANT_FIRST any elements will be added to the front of the array. This order acts as the default for encoding primary types added to this array.
Functions
Adds a MedFloat16 to the array.
Adds a MedFloat32 to the array.
Adds a Boolean to the array. Any subsequent Boolean will be added as the next bit of a byte until the byte is full. If any additional element is added in between, the Boolean containing byte will be added as is.
Adds a single Byte to the array
Adds a ByteArray to the array. The order of this array will be preserved but its position is determined by byteOrder.
Adds a single UByte to the array
Adds an Int24 to the array, encoded using Int24.toByteArray
Adds a UInt24 to the array, encoded using UInt24.toByteArray
Adds a Double to the array, encoded using Double.toByteArray
Adds a Float to the array, encoded using Float.toByteArray
Adds an Int to the array, encoded using Int.toByteArray
Adds a Long to the array, encoded using Long.toByteArray
Adds a Short to the array, encoded using Short.toByteArray
Adds a UInt to the array, encoded using UInt.toByteArray
Adds a ULong to the array, encoded using ULong.toByteArray
Adds a UShort to the array, encoded using UShort.toByteArray
Adds a Char to the array. The char will be encoded using Encoding.encodeChar
Adds a String to the array. The String will be encoded using Encoding.encodeString