Returns true if the stream has reached the end of the input.
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.
The old limit, as returned by { @code pushLimit}.
Sets currentLimit
to (current position) + byteLimit
.
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.
the old limit.
Read a bool
field value from the stream.
Read a bytes
field value from the stream.
Read a bytes
field value from the stream.
Read a double
field value from the stream.
Read an enum 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 a fixed32
field value from the stream.
Read a fixed64
field value from the stream.
Read a float
field value from the stream.
Read an int32
field value from the stream.
Read an int64
field value from the stream.
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 64-bit little-endian integer from the stream.
Read a raw Varint 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.
Read a raw Varint from the stream.
Read an sfixed32
field value from the stream.
Read an sfixed64
field value from the stream.
Read an sint32
field value from the stream.
Read an sint64
field value from the stream.
Attempt to read a field tag, returning zero if we have reached EOF.
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.
Read a uint32
field value from the stream.
Read a uint64
field value from the stream.
Reads and discards a single field, given its tag value.
Reads and discards a single field, given its tag value.
{ @code false} if the tag is an endgroup tag, in which case nothing is skipped. Otherwise, returns { @code true}.
Reads and discards an entire message.
Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.
Reads and discards size
bytes.