add

abstract fun add(byte: Byte)

Adds a single Byte to the array

Parameters

byte

the Byte to add


abstract fun add(short: Short, order: ByteOrder = byteOrder)

Adds a Short to the array, encoded using Short.toByteArray

Parameters

short

the short to add

order

the ByteOrder in which the Short will be encoded. Defaults to byteOrder


abstract fun add(int24: Int24, order: ByteOrder = byteOrder)

Adds an Int24 to the array, encoded using Int24.toByteArray

Parameters

int24

the Int24 to add

order

the ByteOrder in which the Int23 will be encoded. Defaults to byteOrder


abstract fun add(int: Int, order: ByteOrder = byteOrder)

Adds an Int to the array, encoded using Int.toByteArray

Parameters

int

the Int to add

order

the ByteOrder in which the Int will be encoded. Defaults to byteOrder


abstract fun add(long: Long, order: ByteOrder = byteOrder)

Adds a Long to the array, encoded using Long.toByteArray

Parameters

long

the Long to add

order

the ByteOrder in which the Long will be encoded. Defaults to byteOrder


abstract fun add(float: Float, order: ByteOrder = byteOrder)

Adds a Float to the array, encoded using Float.toByteArray

Parameters

float

the Float to add

order

the ByteOrder in which the Float will be encoded. Defaults to byteOrder


abstract fun add(double: Double, order: ByteOrder = byteOrder)

Adds a Double to the array, encoded using Double.toByteArray

Parameters

double

the Double to add

order

the ByteOrder in which the Double will be encoded. Defaults to byteOrder


abstract fun add(uByte: UByte)

Adds a single UByte to the array

Parameters

uByte

the UByte to add


abstract fun add(uShort: UShort, order: ByteOrder = byteOrder)

Adds a UShort to the array, encoded using UShort.toByteArray

Parameters

uShort

the UShort to add

order

the ByteOrder in which the UShort will be encoded. Defaults to byteOrder


abstract fun add(uInt: UInt, order: ByteOrder = byteOrder)

Adds a UInt to the array, encoded using UInt.toByteArray

Parameters

uInt

the UInt to add

order

the ByteOrder in which the UInt will be encoded. Defaults to byteOrder


abstract fun add(uLong: ULong, order: ByteOrder = byteOrder)

Adds a ULong to the array, encoded using ULong.toByteArray

Parameters

uLong

the ULong to add

order

the ByteOrder in which the ULong will be encoded. Defaults to byteOrder


abstract fun add(uInt24: UInt24, order: ByteOrder = byteOrder)

Adds a UInt24 to the array, encoded using UInt24.toByteArray

Parameters

uInt24

the UInt24 to add

order

the ByteOrder in which the UInt24 will be encoded. Defaults to byteOrder


abstract fun add(medFloat16: MedFloat16)

Adds a MedFloat16 to the array.

Parameters

medFloat16

The MedFloat16 to add.


abstract fun add(medFloat32: MedFloat32)

Adds a MedFloat32 to the array.

Parameters

medFloat32

The MedFloat32 to add.


abstract fun add(flag: Boolean)

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.

Parameters

flag

the Boolean to add.


abstract fun add(bytes: ByteArray)

Adds a ByteArray to the array. The order of this array will be preserved but its position is determined by byteOrder.

Parameters

bytes

The ByteArray to add.


abstract fun add(char: Char, encoding: Encoding = Encoding.UTF_8, order: ByteOrder = byteOrder)

Adds a Char to the array. The char will be encoded using Encoding.encodeChar

Parameters

char

the Char to add

encoding

the Encoding to encode the char with.

order

the ByteOrder in which the Char will be encoded.


abstract fun add(string: String, settings: StringEncodingSettings = StringEncodingSettings(), order: ByteOrder = byteOrder)

Adds a String to the array. The String will be encoded using Encoding.encodeString

Parameters

string

the String to add

settings

the StringEncodingSettings to encode the String with.

order

the ByteOrder in which the String will be encoded.