The number of bytes in the buffer
The number of bytes in the buffer
Returns a new buffer representing a slice of this buffer, delimited
by the indices from
inclusive and until
exclusive: [from, until)
.
Returns a new buffer representing a slice of this buffer, delimited
by the indices from
inclusive and until
exclusive: [from, until)
.
Out of bounds indices are truncated. Negative indices are not accepted.
Helper to support 0-copy coercion to Buf.ByteArray.
Helper to support 0-copy coercion to Buf.ByteArray.
Write the entire contents of the buffer into the given array at the given offset.
Write the entire contents of the buffer into the given array at the given offset. Partial writes aren't supported directly through this API; they easily performed by first slicing the buffer.
IllegalArgumentException
when output
is too small to
contain all the data.
Concatenate this buffer with the given buffer.
Concatenate this buffer with the given buffer.
Definitely requires copying.
Definitely requires copying.
May require copying.
May require copying.
Abstract
Buf
class for Java compatibility.