- Companion
- object
Value members
Concrete methods
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)]]
.
Discards the current limit, returning to the previous limit.
Discards the current limit, returning to the previous limit.
- Value Params
- oldLimit
The old limit, as returned by { @code pushLimit}.
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
CodedInputStream
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.
- Returns
the old limit.
Read a bytes
field value from the stream.
Read a bytes
field value from the stream.
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.
Read one byte from the input.
Read one byte from the input.
Read a fixed size of bytes from the input.
Read a fixed size of bytes from the input.
Read a 32-bit little-endian integer from the stream.
Read a 32-bit little-endian integer from the stream.
Read a 64-bit little-endian integer from the stream.
Read a 64-bit little-endian integer from the stream.
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.
Read a raw Varint from the stream.
Read a raw Varint from the stream.
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.
Reads and discards a single field, given its tag value.
Reads and discards a single field, given its tag value.
- Returns
{ @code false} if the tag is an endgroup tag, in which case nothing is skipped. Otherwise, returns { @code true}.