Verifies that the last call to readTag() returned the given tag value.
Verifies that the last call to readTag() returned the given tag value. This is used to verify that a nested group ended with the correct end tag.
InvalidProtocolBufferException
value
does not match the
last tag.
Decode a ZigZag-encoded 32-bit value.
Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.)
An unsigned 32-bit integer, stored in a signed int because Java has no explicit unsigned support.
A signed 32-bit integer.
Decode a ZigZag-encoded 64-bit value.
Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.)
An unsigned 64-bit integer, stored in a signed int because Java has no explicit unsigned support.
A signed 64-bit integer.
Is there another element to read in the collection?
Is there another element to read in the collection?
The last field name that was read (if any)
The last field name that was read (if any)
The last field number that was read (if any)
The last field number that was read (if any)
The last tag that was read by readTag()
The last tag that was read by readTag()
Was the last tag read for a null field? This is only applicable for reading fields but is safe to use in the readNestedXXX call because it will only ever be true if we are actually reading a null value field.
Was the last tag read for a null field? This is only applicable for reading fields but is safe to use in the readNestedXXX call because it will only ever be true if we are actually reading a null value field.
Returns true if the next value is known to be null otherwise false if the value is not null or is unknown.
Returns true if the next value is known to be null otherwise false if the value is not null or is unknown. This means that even if the next value ends up being null this can return false.
Note: If the next value is null then this method should consume that input
If dynamic string maps are supported then this should be implemented otherwise this can just throw an exception.
If dynamic string maps are supported then this should be implemented otherwise this can just throw an exception.
null should be returns on the end of an object/message
Read the next field number
Read the next field number
Read a raw byte with checking for the end of the stream
Read a raw byte with checking for the end of the stream
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 given the first byte.
Read a raw Varint from the stream given the first byte. If larger than 32 bits, discard the upper bits.
Read a raw Varint from the stream.
Read a raw Varint from the stream. If larger than 32 bits, discard the upper bits.
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.
This is for reporting that fields for an object were not read and whether or not they had a user-defined default value.
This is for reporting that fields for an object were not read and whether or not they had a user-defined default value.
The field number
The field name. Note: This can be null.
Whether or not there was a user defined default value (e.g. val foo: Int = 123)
The deserializer for the field. Note: This can be null.
Reads and discards a single field, given its tag value.
Reads and discards a single field, given its tag value.
false
if the tag is an endgroup tag, in which case
nothing is skipped. Otherwise, returns 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.
Reads and discards size
bytes.
InvalidProtocolBufferException
The end of the stream or the current
limit was reached.
Skip an unknown field value.
Skip an unknown field value.
If after calling readFieldNumber(...) we don't know how to handle the resulting field number then this method can be called to skip the value of the field after which we can call readFieldNumber(...) again.
(Since version ) see corresponding Javadoc for more information.