Is there a way to convert a `ByteReadPacket` to a ...
# ktor
e
Is there a way to convert a
ByteReadPacket
to a Java
ByteBuffer
or simple array of bytes?
e
@e5l thank you! I've also found
readByteBuffer
👍 1
I wonder what happens if I do this
Copy code
override fun getBytes(): ByteBuffer {
  bytePacketBuilder.preview {
    return it.readByteBuffer()
  }
}
Is it considered safe?