MsgPackReader

upack.MsgPackReader
class MsgPackReader(input0: Array[Byte]) extends BaseMsgPackReader

Attributes

Graph
Supertypes
trait BufferingByteParser
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def growBuffer(until: Int): Unit

Copies the non-dropped Bytes in the current buffer to the start of either the current buffer, or a newly-allocated larger buffer if necessary.

Copies the non-dropped Bytes in the current buffer to the start of either the current buffer, or a newly-allocated larger buffer if necessary.

Attributes

Definition Classes
BufferingByteParser
def readDataIntoBuffer(buffer: Array[Byte], bufferOffset: Int): (Array[Byte], Boolean, Int)

Inherited methods

def appendBytesToBuilder(bytes: ByteBuilder, bytesStart: Int, bytesLength: Int): Unit

Attributes

Inherited from:
BufferingByteParser
def dropBufferUntil(i: Int): Unit

Attributes

Inherited from:
BufferingByteParser
def getBuffer: Array[Byte]

Attributes

Inherited from:
BufferingByteParser
def getBufferCopyCount(): Int

Attributes

Inherited from:
BufferingByteParser
def getBufferGrowCount(): Int

Attributes

Inherited from:
BufferingByteParser
def getBufferLength(): Int

Attributes

Inherited from:
BufferingByteParser
def getByteSafe(i: Int): Byte

Attributes

Inherited from:
BufferingByteParser
def getByteUnsafe(i: Int): Byte

Attributes

Inherited from:
BufferingByteParser
def getFirstIdx: Int

Attributes

Inherited from:
BufferingByteParser
def getIndex: Int

Attributes

Inherited from:
BaseMsgPackReader
def getLastIdx: Int

Attributes

Inherited from:
BufferingByteParser
def parse[T](visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseArray[T](n: Int, visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseBin[T](n: Int, visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseExt[T](n: Int, visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseMap[T](n: Int, visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseStr[T](n: Int, visitor: Visitor[_, T]): T

Attributes

Inherited from:
BaseMsgPackReader
def parseUInt16(i: Int): Int

Attributes

Inherited from:
BaseMsgPackReader
def parseUInt32(i: Int): Int

Attributes

Inherited from:
BaseMsgPackReader
def parseUInt64(i: Int): Long

Attributes

Inherited from:
BaseMsgPackReader
def parseUInt8(i: Int): Int

Attributes

Inherited from:
BaseMsgPackReader
protected def requestUntil(until: Int): Boolean

Used to ensure that byteents up to until are available to read; returns whether or not we have read off the end of the input.

Used to ensure that byteents up to until are available to read; returns whether or not we have read off the end of the input.

In the fast path, when until is less than the lastIdx we have buffered, there is no work to do and we return false.

In the slow path, when until is more than lastIdx, we then run growBuffer to grow the buffer if necessary, and then readDataIntoBuffer to populate it. readDataIntoBuffer returns a newDone value to indicate whether we have read off the end of the input or not.

Note that for some subclasses, growBuffer may be a no-op when we already know we have reached the end of input.

Attributes

Inherited from:
BufferingByteParser
protected def requestUntilGetSafeIndex(until: Int): Int

Used to ask for data up to a certain index, as a best effort (unlike requestUntil), returning the "safe index" which it was actually able to fetch data for. This is used so the caller can use the safe index to know how far it is able to run getByteUnsafe calls without further checks, improving performance over calling getByteSafe every time which performs additional checks and logic

Used to ask for data up to a certain index, as a best effort (unlike requestUntil), returning the "safe index" which it was actually able to fetch data for. This is used so the caller can use the safe index to know how far it is able to run getByteUnsafe calls without further checks, improving performance over calling getByteSafe every time which performs additional checks and logic

Attributes

Inherited from:
BufferingByteParser
def sliceArr(i: Int, n: Int): (Array[Byte], Int, Int)

Attributes

Inherited from:
BufferingByteParser
def sliceString(i: Int, k: Int): String

Attributes

Inherited from:
BufferingByteParser
def unsafeCharSeqForRange(start: Int, length: Int): WrapByteArrayCharSeq

Attributes

Inherited from:
BufferingByteParser

Concrete fields

val srcLength: Int