append

fun append(byte: Byte)(source)

Append a single byte to this builder.

Parameters

byte

the byte to append.


fun append(array: ByteArray, startIndex: Int = 0, endIndex: Int = array.size)(source)

Appends a subarray of array starting at startIndex and ending at endIndex to this builder.

Parameters

array

the array whose subarray should be appended.

startIndex

the first index (inclusive) to copy data from the array.

endIndex

the last index (exclusive) to copy data from the array

Throws

when startIndex or endIndex is out of range of array array indices.

when startIndex > endIndex.