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

Attributes

Inherited from:
BufferStringUtils
final def getStringAsBoolean(buffer: Buffer, index: Int): Boolean

Attributes

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 protected def isLeap(year: Int): Boolean

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
BufferNumberUtils
final def readStringAsBoolean(buffer: Buffer): Boolean

Attributes

Inherited from:
BufferBaseUtils
final def readStringAsByte(buffer: Buffer): Byte

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

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 writeBigIntAsString(buffer: Buffer, bigInt: BigInt): Unit

Attributes

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

Attributes

Inherited from:
BufferNumberUtils
final def writeBooleanAsString(buffer: Buffer, boolean: Boolean): Unit

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
BufferTimeUtils