snapshot

common
fun snapshot(): ByteString

Returns an immutable copy of this buffer as a byte string.

fun snapshot(): ByteString
fun snapshot(byteCount: Int): ByteString
common
fun snapshot(byteCount: Int): ByteString

Returns an immutable copy of the first byteCount bytes of this buffer as a byte string.