BufferUtils

Functions

Link copied to clipboard

Convert byte buffer's content into characters. The input buffer's bytes are not consumed (mark is set and reset).

Link copied to clipboard

Convert chars into bytes.

Link copied to clipboard

Ensure the buffer's capacity is large enough to hold a given number of elements. If the input buffer is not large enough, a new buffer is allocated and returned.

Link copied to clipboard
fun sharedPrefixLength(a: ByteBuffer, aStart: Int, b: ByteBuffer, bStart: Int): Int

Compute the length of the shared prefix between two byte sequences.

Link copied to clipboard
Link copied to clipboard
fun toString(buffer: CharBuffer): String
fun toString(buffer: ByteBuffer, charset: Charset): String