encodeByteArray

abstract fun encodeByteArray(src: ByteArray, offset: Int = 0, length: Int = src.size)

Writes length number of bytes from src into the array with the given offset, and then increments the position.