BufferBaseUtils

cc.otavia.buffer.utils.BufferBaseUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

final protected def byteToChar(b2: Byte): Char
final protected def digitCount(q0: Long): Int
final def getStringAsBoolean(buffer: Buffer, index: Int): Boolean

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.

final def isNonEscapedAscii(ch: Char): Boolean

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

true if the character is a basic ASCII character (code point less than 0x80) that does not need JSON escaping

final def readStringAsBoolean(buffer: Buffer): Boolean

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.

final def readStringAsByte(buffer: Buffer): Byte

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.

final protected def rop(g1: Long, g0: Long, cp: Long): Long
final protected def rop(g: Long, cp: Int): Int
final def setBooleanAsString(buffer: Buffer, index: Int, boolean: Boolean): Unit

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

final protected def write18Digits(buffer: Buffer, x: Long, ds: Array[Short]): Unit
final protected def write2Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit
final protected def write3Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit
final protected def write4Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit
final protected def write8Digits(buffer: Buffer, q0: Long, ds: Array[Short]): Unit
final def writeBooleanAsString(buffer: Buffer, boolean: Boolean): Unit

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

final def writeByteAsString(buffer: Buffer, byte: Byte): Unit

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

final protected def writePositiveIntDigits(q: Int, p: Int, buffer: Buffer, ds: Array[Short]): Unit