append

Appends a single byte to the buffer.

Parameters

byte

Value to append to buffer.


fun append(array: ByteArray, srcRange: IntRange = array.indices)

Appends a byte array to the buffer, optionally by only copying a section of it as specified by srcRange.

Parameters

array

ByteArray (or part thereof) to append.

srcRange

(optional) Section of the array to append.