SemanticdbInputStream

dotty.tools.dotc.semanticdb.internal.SemanticdbInputStream
See theSemanticdbInputStream companion object

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Constructors

def this(buffer: Array[Byte], offset: Int, len: Int)
def this(is: InputStream)

Concrete methods

def checkLastTagWas(value: Int): Unit
def enableAliasing(aliasing: Boolean): Unit
def isAtEnd: Boolean

Returns true if the stream has reached the end of the input. This is the case if either the end of the underlying input source has been reached or if the stream has reached a limit created using [[#pushLimit(int)]].

Returns true if the stream has reached the end of the input. This is the case if either the end of the underlying input source has been reached or if the stream has reached a limit created using [[#pushLimit(int)]].

Attributes

def popLimit(oldLimit: Int): Unit

Discards the current limit, returning to the previous limit.

Discards the current limit, returning to the previous limit.

Attributes

oldLimit

The old limit, as returned by { @code pushLimit}.

def pushLimit(byteLimit0: Int): Int

Sets currentLimit to (current position) + byteLimit. This is called when descending into a length-delimited embedded message.

Sets currentLimit to (current position) + byteLimit. This is called when descending into a length-delimited embedded message.

Note that pushLimit() does NOT affect how many bytes the SemanticdbInputStream reads from an underlying InputStream when refreshing its buffer. If you need to prevent reading past a certain point in the underlying InputStream (e.g. because you expect it to contain more data after the end of the message which you need to handle differently) then you must place a wrapper around your InputStream which limits the amount of data that can be read from it.

Attributes

Returns:

the old limit.

def readBool(): Boolean

Read a bool field value from the stream.

Read a bool field value from the stream.

Attributes

def readDouble(): Double

Read a double field value from the stream.

Read a double field value from the stream.

Attributes

def readEnum(): Int

Read an enum field value from the stream. Caller is responsible for converting the numeric value to an actual enum.

Read an enum field value from the stream. Caller is responsible for converting the numeric value to an actual enum.

Attributes

def readFixed32(): Int

Read a fixed32 field value from the stream.

Read a fixed32 field value from the stream.

Attributes

def readFixed64(): Long

Read a fixed64 field value from the stream.

Read a fixed64 field value from the stream.

Attributes

def readFloat(): Float

Read a float field value from the stream.

Read a float field value from the stream.

Attributes

def readInt32(): Int

Read an int32 field value from the stream.

Read an int32 field value from the stream.

Attributes

def readInt64(): Long

Read an int64 field value from the stream.

Read an int64 field value from the stream.

Attributes

def readRawByte(): Byte

Read one byte from the input.

Read one byte from the input.

Attributes

def readRawBytes(size: Int): Array[Byte]

Read a fixed size of bytes from the input.

Read a fixed size of bytes from the input.

Attributes

Read a 32-bit little-endian integer from the stream.

Read a 32-bit little-endian integer from the stream.

Attributes

Read a 64-bit little-endian integer from the stream.

Read a 64-bit little-endian integer from the stream.

Attributes

def readRawVarint32(): Int

Read a raw Varint from the stream. If larger than 32 bits, discard the upper bits.

Read a raw Varint from the stream. If larger than 32 bits, discard the upper bits.

Attributes

def readRawVarint64(): Long

Read a raw Varint from the stream.

Read a raw Varint from the stream.

Attributes

def readSFixed32(): Int

Read an sfixed32 field value from the stream.

Read an sfixed32 field value from the stream.

Attributes

def readSFixed64(): Long

Read an sfixed64 field value from the stream.

Read an sfixed64 field value from the stream.

Attributes

def readSInt32(): Int

Read an sint32 field value from the stream.

Read an sint32 field value from the stream.

Attributes

def readSInt64(): Long

Read an sint64 field value from the stream.

Read an sint64 field value from the stream.

Attributes

def readString(): String
def readStringRequireUtf8(): String
def readTag(): Int

Attempt to read a field tag, returning zero if we have reached EOF. Protocol message parsers use this to read tags, since a protocol message may legally end wherever a tag occurs, and zero is not a valid tag number.

Attempt to read a field tag, returning zero if we have reached EOF. Protocol message parsers use this to read tags, since a protocol message may legally end wherever a tag occurs, and zero is not a valid tag number.

Attributes

def readUInt32(): Int

Read a uint32 field value from the stream.

Read a uint32 field value from the stream.

Attributes

def readUInt64(): Long

Read a uint64 field value from the stream.

Read a uint64 field value from the stream.

Attributes

def resetSizeCounter(): Unit
def setSizeLimit(limit: Int): Int
def skipField(tag: Int): Boolean

Reads and discards a single field, given its tag value.

Reads and discards a single field, given its tag value.

Attributes

Returns:

{ @code false} if the tag is an endgroup tag, in which case nothing is skipped. Otherwise, returns { @code true}.

def skipMessage(): Unit

Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.

Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.

Attributes

def skipRawBytes(size: Int): Unit

Reads and discards size bytes.

Reads and discards size bytes.

Attributes