toByteString

@JvmName(name = "of")
fun ByteBuffer.toByteString(): ByteString

Returns a ByteString containing a copy of this ByteBuffer.

common
fun ByteArray.toByteString(offset: Int = 0, byteCount: Int = size): ByteString

Returns a new ByteString containing a copy of byteCount bytes of this ByteArray starting at offset.

@JvmName(name = "of")
fun ByteArray.toByteString(offset: Int = 0, byteCount: Int = size): ByteString