peekString

fun peekString(numBytes: Int): String

Reads a String from the byte array without advancing the cursor.

Return

A String containing the decoded characters.

Parameters

numBytes

The number of bytes to read.

Throws

If the numBytes is negative or if the requested range (cursor + numBytes) extends beyond the bounds of the ByteArray.