BufferUtils

cc.otavia.buffer.BufferUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Inherited methods

final protected def byteToChar(b2: Byte): Char

Attributes

Inherited from:
BufferBaseUtils
final protected def digitCount(q0: Long): Int

Attributes

Inherited from:
BufferBaseUtils
final def getEscapedChar(index: Int, buffer: Buffer): Char

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.

Inherited from:
BufferStringUtils
final def getFixedStringAsDouble(buffer: Buffer, index: Int, length: Int): Double

Parses a fixed-length string at the given index as a Double, without advancing the readerOffset. Uses zero-allocation manual mantissa/exponent parsing with three-tier conversion.

Parses a fixed-length string at the given index as a Double, without advancing the readerOffset. Uses zero-allocation manual mantissa/exponent parsing with three-tier conversion.

Attributes

Inherited from:
BufferNumberUtils
final def getFixedStringAsLong(buffer: Buffer, index: Int, length: Int, radix: Int = ...): Long

Parses a fixed-length string at the given index as a signed Long, without advancing the readerOffset. Uses direct byte-level parsing with overflow checking (port of JDK Long.parseLong).

Parses a fixed-length string at the given index as a signed Long, without advancing the readerOffset. Uses direct byte-level parsing with overflow checking (port of JDK Long.parseLong).

Attributes

Inherited from:
BufferNumberUtils
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.

Inherited from:
BufferBaseUtils
final def getStringAsUUID(buffer: Buffer, index: Int): UUID

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.

Inherited from:
BufferStringUtils
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

Inherited from:
BufferBaseUtils
final def readEscapedChar(buffer: Buffer): Char

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.

Inherited from:
BufferStringUtils
final def readEscapedString(buffer: Buffer, len: Int): String

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.

Inherited from:
BufferStringUtils
final def readFixedStringAsDouble(buffer: Buffer, length: Int): Double

Parses a fixed-length string in the buffer as a Double, then advances the readerOffset by length. Uses zero-allocation manual mantissa/exponent parsing with three-tier conversion.

Parses a fixed-length string in the buffer as a Double, then advances the readerOffset by length. Uses zero-allocation manual mantissa/exponent parsing with three-tier conversion.

Attributes

Inherited from:
BufferNumberUtils
final def readFixedStringAsLong(buffer: Buffer, length: Int, radix: Int = ...): Long

Parses a fixed-length string in the buffer as a signed Long, then advances the readerOffset by length. Uses direct byte-level parsing with overflow checking (port of JDK Long.parseLong).

Parses a fixed-length string in the buffer as a signed Long, then advances the readerOffset by length. Uses direct byte-level parsing with overflow checking (port of JDK Long.parseLong).

Attributes

Inherited from:
BufferNumberUtils
final def readStringAsBigDecimal(buffer: Buffer): BigDecimal

Parse a variable-length string at the current readerOffset as a Scala BigDecimal. Supports decimal point and scientific notation. Advances the readerOffset past the parsed characters.

Parse a variable-length string at the current readerOffset as a Scala BigDecimal. Supports decimal point and scientific notation. Advances the readerOffset past the parsed characters.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed BigDecimal value.

Inherited from:
BufferNumberUtils
final def readStringAsBigInt(buffer: Buffer): BigInt

Parse a variable-length decimal string at the current readerOffset as a Scala BigInt. Advances the readerOffset past the parsed digits (and optional leading '-').

Parse a variable-length decimal string at the current readerOffset as a Scala BigInt. Advances the readerOffset past the parsed digits (and optional leading '-').

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed BigInt value.

Throws
NumberFormatException

if the string contains no digits.

Inherited from:
BufferNumberUtils
final def readStringAsBigInteger(buffer: Buffer): BigInteger

Parse a variable-length decimal string at the current readerOffset as a BigInteger. Advances the readerOffset past the parsed digits (and optional leading '-').

Parse a variable-length decimal string at the current readerOffset as a BigInteger. Advances the readerOffset past the parsed digits (and optional leading '-').

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed BigInteger value.

Throws
NumberFormatException

if the string contains no digits.

Inherited from:
BufferNumberUtils
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.

Inherited from:
BufferBaseUtils
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.

Inherited from:
BufferBaseUtils
final def readStringAsDouble(buffer: Buffer): Double

Parse a variable-length string at the current readerOffset as a Double. Supports optional sign, decimal point, and scientific notation (e/E). Uses zero-allocation mantissa/exponent parsing with three-tier conversion for performance. Advances the readerOffset past the parsed characters.

Parse a variable-length string at the current readerOffset as a Double. Supports optional sign, decimal point, and scientific notation (e/E). Uses zero-allocation mantissa/exponent parsing with three-tier conversion for performance. Advances the readerOffset past the parsed characters.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed double value.

Throws
NumberFormatException

if the string does not represent a valid double value.

Inherited from:
BufferNumberUtils
final def readStringAsDuration(buffer: Buffer): Duration

Parse String into Duration. Format is "<length><unit>", where whitespace is allowed before, between and after the parts. Infinities are designated by "Inf", "PlusInf", "+Inf", "Duration.Inf" and "-Inf", "MinusInf" or "Duration.MinusInf". Undefined is designated by "Duration.Undefined".

Parse String into Duration. Format is "<length><unit>", where whitespace is allowed before, between and after the parts. Infinities are designated by "Inf", "PlusInf", "+Inf", "Duration.Inf" and "-Inf", "MinusInf" or "Duration.MinusInf". Undefined is designated by "Duration.Undefined".

Attributes

Throws
NumberFormatException

if format is not parsable

Inherited from:
BufferTimeUtils
final def readStringAsFloat(buffer: Buffer): Float

Parse a variable-length string at the current readerOffset as a Float. Supports optional sign, decimal point, and scientific notation (e/E). Uses zero-allocation mantissa/exponent parsing with three-tier conversion for performance. Advances the readerOffset past the parsed characters.

Parse a variable-length string at the current readerOffset as a Float. Supports optional sign, decimal point, and scientific notation (e/E). Uses zero-allocation mantissa/exponent parsing with three-tier conversion for performance. Advances the readerOffset past the parsed characters.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed float value.

Throws
NumberFormatException

if the string does not represent a valid float value.

Inherited from:
BufferNumberUtils
final def readStringAsInstant(buffer: Buffer): Instant

Parse an ISO-8601 instant string at the current readerOffset as an Instant.

Parse an ISO-8601 instant string at the current readerOffset as an Instant.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed Instant.

Inherited from:
BufferTimeUtils
final def readStringAsInt(buffer: Buffer): Int

Parse a variable-length decimal string at the current readerOffset as an Int. Advances the readerOffset past the parsed digits (and optional leading '-').

Parse a variable-length decimal string at the current readerOffset as an Int. Advances the readerOffset past the parsed digits (and optional leading '-').

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed int value.

Throws
NumberFormatException

if the string does not represent a valid int value.

Inherited from:
BufferNumberUtils
final def readStringAsIntYear(buffer: Buffer): Int

Parse a variable-length year string at the current readerOffset as an Int. Supports 4-digit years and signed extended years.

Parse a variable-length year string at the current readerOffset as an Int. Supports 4-digit years and signed extended years.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed year as an Int.

Inherited from:
BufferTimeUtils
final def readStringAsJBigDecimal(buffer: Buffer): BigDecimal

Parse a variable-length string at the current readerOffset as a java.math.BigDecimal. Supports decimal point and scientific notation. Advances the readerOffset past the parsed characters.

Parse a variable-length string at the current readerOffset as a java.math.BigDecimal. Supports decimal point and scientific notation. Advances the readerOffset past the parsed characters.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed BigDecimal value.

Inherited from:
BufferNumberUtils
final def readStringAsJDuration(buffer: Buffer): Duration

Obtains a java.time.Duration from a text string such as PnDTnHnMn.nS.

Obtains a java.time.Duration from a text string such as PnDTnHnMn.nS.

This will parse a textual representation of a duration, like the string produced by toString. The formats accepted are based on the ISO-8601 duration format PnDTnHnMn.nS with days considered to be exactly 24 hours.

The string starts with an optional sign, denoted by the ASCII negative or positive symbol. If negative, the whole period is negated. The ASCII letter "P" is next in upper or lower case. There are then four sections, each consisting of a number and a suffix. The sections have suffixes in ASCII of "D", "H", "M" and "S" for days, hours, minutes and seconds, accepted in upper or lower case. The suffixes must occur in order. The ASCII letter "T" must occur before the first occurrence, if any, of an hour, minute or second section. At least one of the four sections must be present, and if "T" is present there must be at least one section after the "T". The number part of each section must consist of one or more ASCII digits. The number may be prefixed by the ASCII negative or positive symbol. The number of days, hours and minutes must parse to a long. The number of seconds must parse to a long with optional fraction. The decimal point may be either a dot or a comma. The fractional part may have from zero to 9 digits.

The leading plus/minus sign, and negative values for other units are not part of the ISO-8601 standard.

Examples:

  "PT20.345S" -- parses as "20.345 seconds"
  "PT15M"     -- parses as "15 minutes" (where a minute is 60 seconds)
  "PT10H"     -- parses as "10 hours" (where an hour is 3600 seconds)
  "P2D"       -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
  "P2DT3H4M"  -- parses as "2 days, 3 hours and 4 minutes"
  "PT-6H3M"    -- parses as "-6 hours and +3 minutes"
  "-PT6H3M"    -- parses as "-6 hours and -3 minutes"
  "-PT-6H+3M"  -- parses as "+6 hours and -3 minutes"

Value parameters

buffer

the Buffer to read.

Attributes

Returns

the parsed duration, not null

Throws
DateTimeParseException

if the text cannot be parsed to a duration

Inherited from:
BufferTimeUtils
final def readStringAsLocalDate(buffer: Buffer): LocalDate

Parse an ISO-8601 date string at the current readerOffset as a LocalDate.

Parse an ISO-8601 date string at the current readerOffset as a LocalDate.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed LocalDate.

Inherited from:
BufferTimeUtils
final def readStringAsLocalDateTime(buffer: Buffer): LocalDateTime

Parse an ISO-8601 date-time string at the current readerOffset as a LocalDateTime.

Parse an ISO-8601 date-time string at the current readerOffset as a LocalDateTime.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed LocalDateTime.

Inherited from:
BufferTimeUtils
final def readStringAsLocalTime(buffer: Buffer): LocalTime

Parse an ISO-8601 time string at the current readerOffset as a LocalTime.

Parse an ISO-8601 time string at the current readerOffset as a LocalTime.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed LocalTime.

Inherited from:
BufferTimeUtils
final def readStringAsLong(buffer: Buffer): Long

Parse a variable-length decimal string at the current readerOffset as a Long. Supports optional leading '+' or '-'. Advances the readerOffset past the parsed digits.

Parse a variable-length decimal string at the current readerOffset as a Long. Supports optional leading '+' or '-'. Advances the readerOffset past the parsed digits.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed long value.

Throws
NumberFormatException

if the string does not represent a valid long value or overflows.

Inherited from:
BufferNumberUtils
final def readStringAsMonthDay(buffer: Buffer): MonthDay

Parse an ISO-8601 month-day string at the current readerOffset as a MonthDay.

Parse an ISO-8601 month-day string at the current readerOffset as a MonthDay.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed MonthDay.

Inherited from:
BufferTimeUtils
final def readStringAsOffsetDateTime(buffer: Buffer): OffsetDateTime

Parse an ISO-8601 offset date-time string at the current readerOffset as an OffsetDateTime.

Parse an ISO-8601 offset date-time string at the current readerOffset as an OffsetDateTime.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed OffsetDateTime.

Inherited from:
BufferTimeUtils
final def readStringAsOffsetTime(buffer: Buffer): OffsetTime

Parse an ISO-8601 offset time string at the current readerOffset as an OffsetTime.

Parse an ISO-8601 offset time string at the current readerOffset as an OffsetTime.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed OffsetTime.

Inherited from:
BufferTimeUtils
final def readStringAsPeriod(buffer: Buffer): Period

Parse a period string at the current readerOffset as a Period.

Parse a period string at the current readerOffset as a Period.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed Period.

Inherited from:
BufferTimeUtils
final def readStringAsShort(buffer: Buffer): Short

Parse a variable-length decimal string at the current readerOffset as a Short. Advances the readerOffset past the parsed digits (and optional leading '-').

Parse a variable-length decimal string at the current readerOffset as a Short. Advances the readerOffset past the parsed digits (and optional leading '-').

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed short value.

Throws
NumberFormatException

if the string does not represent a valid short value.

Inherited from:
BufferNumberUtils
final def readStringAsUUID(buffer: Buffer): UUID

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.

Inherited from:
BufferStringUtils
final def readStringAsYear(buffer: Buffer): Year

Parse a variable-length year string at the current readerOffset as a Year.

Parse a variable-length year string at the current readerOffset as a Year.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed Year.

Inherited from:
BufferTimeUtils
final def readStringAsYearMonth(buffer: Buffer): YearMonth

Parse an ISO-8601 yyyy-mm string at the current readerOffset as a YearMonth.

Parse an ISO-8601 yyyy-mm string at the current readerOffset as a YearMonth.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed YearMonth.

Inherited from:
BufferTimeUtils
final def readStringAsZoneId(buffer: Buffer): ZoneId

Parse a zone ID string at the current readerOffset as a ZoneId.

Parse a zone ID string at the current readerOffset as a ZoneId.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed ZoneId.

Inherited from:
BufferTimeUtils
final def readStringAsZoneOffset(buffer: Buffer): ZoneOffset

Parse a zone offset string at the current readerOffset as a ZoneOffset.

Parse a zone offset string at the current readerOffset as a ZoneOffset.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed ZoneOffset.

Inherited from:
BufferTimeUtils
final def readStringAsZonedDateTime(buffer: Buffer): ZonedDateTime

Parse an ISO-8601 zoned date-time string at the current readerOffset as a ZonedDateTime.

Parse an ISO-8601 zoned date-time string at the current readerOffset as a ZonedDateTime.

Value parameters

buffer

The buffer to read from.

Attributes

Returns

The parsed ZonedDateTime.

Inherited from:
BufferTimeUtils
final protected def rop(g: Long, cp: Int): Int

Attributes

Inherited from:
BufferBaseUtils
final protected def rop(g1: Long, g0: Long, cp: Long): Long

Attributes

Inherited from:
BufferBaseUtils
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

Inherited from:
BufferBaseUtils
final def setUUIDAsString(buffer: Buffer, index: Int, uuid: UUID): Unit

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

Inherited from:
BufferStringUtils
final protected def write18Digits(buffer: Buffer, x: Long, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferBaseUtils
final protected def write2Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferBaseUtils
final protected def write3Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferBaseUtils
final protected def write4Digits(buffer: Buffer, q0: Int, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferBaseUtils
final protected def write8Digits(buffer: Buffer, q0: Long, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferBaseUtils
final def writeBigDecimalAsString(buffer: Buffer, bigDecimal: BigDecimal): Unit

Write the given Scala BigDecimal as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Write the given Scala BigDecimal as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Value parameters

bigDecimal

The BigDecimal value to write.

buffer

The buffer to write to.

Attributes

Inherited from:
BufferNumberUtils
final def writeBigIntAsString(buffer: Buffer, bigInt: BigInt): Unit

Write the given BigInt as a decimal ASCII string at the current writerOffset. Delegates to writeLongAsString if the value fits in a long, otherwise uses BigInteger rendering. Advances the writerOffset by the number of bytes written.

Write the given BigInt as a decimal ASCII string at the current writerOffset. Delegates to writeLongAsString if the value fits in a long, otherwise uses BigInteger rendering. Advances the writerOffset by the number of bytes written.

Value parameters

bigInt

The BigInt value to write.

buffer

The buffer to write to.

Attributes

Inherited from:
BufferNumberUtils
final def writeBigIntegerAsString(buffer: Buffer, num: BigInteger): Unit

Write the given BigInteger as a decimal ASCII string at the current writerOffset. Delegates to writeLongAsString if the value fits in a long, otherwise uses recursive division. Advances the writerOffset by the number of bytes written.

Write the given BigInteger as a decimal ASCII string at the current writerOffset. Delegates to writeLongAsString if the value fits in a long, otherwise uses recursive division. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

num

The BigInteger value to write.

Attributes

Inherited from:
BufferNumberUtils
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

Inherited from:
BufferBaseUtils
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

Inherited from:
BufferBaseUtils
final def writeDoubleAsString(buffer: Buffer, double: Double): Unit

Write the given Double as a decimal ASCII string at the current writerOffset. Uses the Schubfach algorithm for exact double-to-decimal conversion. Advances the writerOffset by the number of bytes written.

Write the given Double as a decimal ASCII string at the current writerOffset. Uses the Schubfach algorithm for exact double-to-decimal conversion. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

double

The double value to write.

Attributes

Inherited from:
BufferNumberUtils
final def writeDurationAsString(buffer: Buffer, duration: Duration): Unit

Write the given Scala Duration as a string at the current writerOffset.

Write the given Scala Duration as a string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

duration

The Duration value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeEscapedChar(buffer: Buffer, ch: Char): Unit

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

Inherited from:
BufferStringUtils
final def writeEscapedCharWithQuote(buffer: Buffer, ch: Char): Unit

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

Inherited from:
BufferStringUtils
final def writeEscapedString(buffer: Buffer, str: String): Unit

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

Inherited from:
BufferStringUtils
final def writeFloatAsString(buffer: Buffer, float: Float): Unit

Write the given Float as a decimal ASCII string at the current writerOffset. Uses the Schubfach algorithm for exact float-to-decimal conversion. Advances the writerOffset by the number of bytes written.

Write the given Float as a decimal ASCII string at the current writerOffset. Uses the Schubfach algorithm for exact float-to-decimal conversion. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

float

The float value to write.

Attributes

Inherited from:
BufferNumberUtils
final def writeInstantAsString(buffer: Buffer, x: Instant): Unit

Write the given Instant as an ISO-8601 string at the current writerOffset.

Write the given Instant as an ISO-8601 string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

x

The Instant value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeIntAsString(buffer: Buffer, int: Int): Unit

Write the given Int as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Write the given Int as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

int

The int value to write.

Attributes

Inherited from:
BufferNumberUtils
final def writeJBigDecimalAsString(buffer: Buffer, bigDecimal: BigDecimal): Unit

Write the given java.math.BigDecimal as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Write the given java.math.BigDecimal as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Value parameters

bigDecimal

The BigDecimal value to write.

buffer

The buffer to write to.

Attributes

Inherited from:
BufferNumberUtils
def writeJDurationAsString(buffer: Buffer, duration: Duration): Unit

Write the given JDuration as an ISO-8601 duration string at the current writerOffset.

Write the given JDuration as an ISO-8601 duration string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

duration

The JDuration value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeLocalDateAsString(buffer: Buffer, localDate: LocalDate): Unit

Write the given LocalDate as an ISO-8601 date string at the current writerOffset.

Write the given LocalDate as an ISO-8601 date string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

localDate

The LocalDate value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeLocalDateTimeAsString(buffer: Buffer, localDateTime: LocalDateTime): Unit

Write the given LocalDateTime as an ISO-8601 date-time string at the current writerOffset.

Write the given LocalDateTime as an ISO-8601 date-time string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

localDateTime

The LocalDateTime value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeLocalTimeAsString(buffer: Buffer, localTime: LocalTime): Unit

Write the given LocalTime as an ISO-8601 time string at the current writerOffset.

Write the given LocalTime as an ISO-8601 time string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

localTime

The LocalTime value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeLongAsString(buffer: Buffer, long: Long): Unit

Write the given Long as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Write the given Long as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

long

The long value to write.

Attributes

Inherited from:
BufferNumberUtils
final def writeMonthDayAsString(buffer: Buffer, monthDay: MonthDay): Unit

Write the given MonthDay as an ISO-8601 string (--mm-dd) at the current writerOffset.

Write the given MonthDay as an ISO-8601 string (--mm-dd) at the current writerOffset.

Value parameters

buffer

The buffer to write to.

monthDay

The MonthDay value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeOffsetDateTimeAsString(buffer: Buffer, offsetDateTime: OffsetDateTime): Unit

Write the given OffsetDateTime as an ISO-8601 string at the current writerOffset.

Write the given OffsetDateTime as an ISO-8601 string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

offsetDateTime

The OffsetDateTime value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeOffsetTimeAsString(buffer: Buffer, offsetTime: OffsetTime): Unit

Write the given OffsetTime as an ISO-8601 string at the current writerOffset.

Write the given OffsetTime as an ISO-8601 string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

offsetTime

The OffsetTime value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writePeriodAsString(buffer: Buffer, period: Period): Unit

Write the given Period as a string at the current writerOffset.

Write the given Period as a string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

period

The Period value to write.

Attributes

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

Attributes

Inherited from:
BufferBaseUtils
final def writeShortAsString(buffer: Buffer, short: Short): Unit

Write the given Short as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Write the given Short as a decimal ASCII string at the current writerOffset. Advances the writerOffset by the number of bytes written.

Value parameters

buffer

The buffer to write to.

short

The short value to write.

Attributes

Inherited from:
BufferNumberUtils
final protected def writeSignificantFractionDigits(x: Int, p: Int, posLim: Int, buffer: Buffer, ds: Array[Short]): Unit

Attributes

Inherited from:
BufferNumberUtils
final def writeUUIDAsString(buffer: Buffer, uuid: UUID): Unit

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 from:
BufferStringUtils
final def writeYearAsString(buffer: Buffer, year: Int): Unit

Write the given year as an ISO-8601 year string at the current writerOffset.

Write the given year as an ISO-8601 year string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

year

The year value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeYearAsString(buffer: Buffer, year: Year): Unit

Write the given Year as an ISO-8601 year string at the current writerOffset.

Write the given Year as an ISO-8601 year string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

year

The year value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeYearMonthAsString(buffer: Buffer, ym: YearMonth): Unit

Write the given YearMonth as an ISO-8601 string (yyyy-mm) at the current writerOffset.

Write the given YearMonth as an ISO-8601 string (yyyy-mm) at the current writerOffset.

Value parameters

buffer

The buffer to write to.

ym

The YearMonth value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeZoneIdAsString(buffer: Buffer, zoneId: ZoneId): Unit

Write the given ZoneId as a string at the current writerOffset.

Write the given ZoneId as a string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

zoneId

The ZoneId value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeZoneOffset(buffer: Buffer, zoneOffset: ZoneOffset): Unit

Write the given ZoneOffset as an ISO-8601 string at the current writerOffset.

Write the given ZoneOffset as an ISO-8601 string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

zoneOffset

The ZoneOffset value to write.

Attributes

Inherited from:
BufferTimeUtils
final def writeZonedDateTime(buffer: Buffer, zonedDateTime: ZonedDateTime): Unit

Write the given ZonedDateTime as an ISO-8601 string at the current writerOffset.

Write the given ZonedDateTime as an ISO-8601 string at the current writerOffset.

Value parameters

buffer

The buffer to write to.

zonedDateTime

The ZonedDateTime value to write.

Attributes

Inherited from:
BufferTimeUtils