readByteBuffer
fun ByteReadPacket.readByteBuffer(n: Int = remaining.coerceAtMostMaxIntOrFail("Unable to make a ByteBuffer: packet is too big"), direct: Boolean = false): ByteBuffer
Content copied to clipboard
Read exactly n (optional, read all remaining by default) bytes to a newly allocated byte buffer
Return
a byte buffer containing n bytes