readBytes

fun readBytes(length: Int): ByteArray

Reads up to length bytes from the current position and returns them as a new ByteArray.