BufferStringUtils
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
object BufferUtils
Members list
Value members
Concrete methods
Get an escaped character at the given index without advancing the readerOffset. Handles backslash escapes and \uXXXX unicode escapes, as well as multi-byte UTF-8 sequences.
Get an escaped character at the given index without advancing the readerOffset. Handles backslash escapes and \uXXXX unicode escapes, as well as multi-byte UTF-8 sequences.
Value parameters
- buffer
-
The buffer to read from.
- index
-
The absolute offset into the buffer.
Attributes
- Returns
-
The decoded character.
Parses the string content stored in the buffer as a UUID.
Parses the string content stored in the buffer as a UUID.
Value parameters
- buffer
-
the buffer to read.
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
- Returns
-
The UUID represented by the string content.
Read an escaped character from the current readerOffset, handling backslash escapes (\n, \t, \", \\) and \uXXXX unicode escapes, as well as multi-byte UTF-8 sequences. Advances the readerOffset past the consumed bytes.
Read an escaped character from the current readerOffset, handling backslash escapes (\n, \t, \", \\) and \uXXXX unicode escapes, as well as multi-byte UTF-8 sequences. Advances the readerOffset past the consumed bytes.
Value parameters
- buffer
-
The buffer to read from.
Attributes
- Returns
-
The decoded character.
Read an escaped string of the given length from the current readerOffset and translate escape sequences using String.translateEscapes. Advances the readerOffset by len.
Read an escaped string of the given length from the current readerOffset and translate escape sequences using String.translateEscapes. Advances the readerOffset by len.
Value parameters
- buffer
-
The buffer to read from.
- len
-
The number of bytes to read.
Attributes
- Returns
-
The unescaped string.
Parses the string content stored in the buffer as a UUID.
Parses the string content stored in the buffer as a UUID.
Value parameters
- buffer
-
the buffer to read.
Attributes
- Returns
-
The UUID represented by the string content.
Writes into this buffer, all the bytes from the given uuid string. This not updates the writerOffset of this buffer.
Writes into this buffer, all the bytes from the given uuid string. This not updates the writerOffset of this buffer.
Value parameters
- buffer
-
the buffer to write.
- index
-
The write offset, an absolute offset into this buffer to write to.
- uuid
-
uuid value.
Attributes
Write the given character as an escaped UTF-8 byte sequence at the current writerOffset. Special characters are escaped with backslash (\n, \t, \", \\), control characters are encoded as \uXXXX. Advances the writerOffset by the number of bytes written.
Write the given character as an escaped UTF-8 byte sequence at the current writerOffset. Special characters are escaped with backslash (\n, \t, \", \\), control characters are encoded as \uXXXX. Advances the writerOffset by the number of bytes written.
Value parameters
- buffer
-
The buffer to write to.
- ch
-
The character to write.
Attributes
Write the given character as a double-quoted, escaped UTF-8 byte sequence at the current writerOffset. The output format is "ch" with proper escaping. Advances the writerOffset by the number of bytes written.
Write the given character as a double-quoted, escaped UTF-8 byte sequence at the current writerOffset. The output format is "ch" with proper escaping. Advances the writerOffset by the number of bytes written.
Value parameters
- buffer
-
The buffer to write to.
- ch
-
The character to write.
Attributes
Write the given string as an escaped UTF-8 byte sequence at the current writerOffset. Special characters are escaped with backslash. Advances the writerOffset by the number of bytes written.
Write the given string as an escaped UTF-8 byte sequence at the current writerOffset. Special characters are escaped with backslash. Advances the writerOffset by the number of bytes written.
Value parameters
- buffer
-
The buffer to write to.
- str
-
The string to write.
Attributes
Writes into this buffer, all the bytes from the given uuid string. This updates the writerOffset of this buffer.
Writes into this buffer, all the bytes from the given uuid string. This updates the writerOffset of this buffer.
Value parameters
- buffer
-
the buffer to write.
- uuid
-
uuid value.
Attributes
Inherited methods
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Get a "true" or "false" string at the given index as a Boolean, without advancing the readerOffset.
Get a "true" or "false" string at the given index as a Boolean, without advancing the readerOffset.
Value parameters
- buffer
-
The buffer to read from.
- index
-
The absolute offset into the buffer.
Attributes
- Returns
-
The parsed boolean value.
- Inherited from:
- BufferBaseUtils
Checks if a character does not require JSON escaping or encoding.
Checks if a character does not require JSON escaping or encoding.
Value parameters
- ch
-
the character to check
Attributes
- Returns
-
trueif the character is a basic ASCII character (code point less than0x80) that does not need JSON escaping - Inherited from:
- BufferBaseUtils
Parse a "true" or "false" string at the current readerOffset as a Boolean. Advances the readerOffset past the parsed characters.
Parse a "true" or "false" string at the current readerOffset as a Boolean. Advances the readerOffset past the parsed characters.
Value parameters
- buffer
-
The buffer to read from.
Attributes
- Returns
-
The parsed boolean value.
- Inherited from:
- BufferBaseUtils
Parse a variable-length decimal string at the current readerOffset as a Byte. Advances the readerOffset past the parsed digits (and optional leading '-').
Parse a variable-length decimal string at the current readerOffset as a Byte. Advances the readerOffset past the parsed digits (and optional leading '-').
Value parameters
- buffer
-
The buffer to read from.
Attributes
- Returns
-
The parsed byte value.
- Throws
-
NumberFormatException
if the string does not represent a valid byte value.
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Set "true" or "false" at the given index, without modifying the writerOffset.
Set "true" or "false" at the given index, without modifying the writerOffset.
Value parameters
- boolean
-
The boolean value to write.
- buffer
-
The buffer to write to.
- index
-
The absolute offset into the buffer.
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils
Write "true" or "false" at the current writerOffset.
Write "true" or "false" at the current writerOffset.
Value parameters
- boolean
-
The boolean value to write.
- buffer
-
The buffer to write to.
Attributes
- Inherited from:
- BufferBaseUtils
Write the given Byte as a decimal ASCII string at the current writerOffset.
Write the given Byte as a decimal ASCII string at the current writerOffset.
Value parameters
- buffer
-
The buffer to write to.
- byte
-
The byte value to write.
Attributes
- Inherited from:
- BufferBaseUtils
Attributes
- Inherited from:
- BufferBaseUtils