public final class UnknownFieldSetImpl extends Object implements UnknownFieldSet, Externalizable
UnknownFieldSet
implementation. This class should never be directly instantiated by users even though it is
marked public
.Constructor and Description |
---|
UnknownFieldSetImpl() |
Modifier and Type | Method and Description |
---|---|
<A> A |
consumeTag(int tag)
Reads and removes a field value from the set.
|
boolean |
hasTag(int tag)
Checks if a tag is present.
|
boolean |
isEmpty()
Checks if there are any fields in this set.
|
void |
putVarintField(int tag,
int value)
Convenience method for merging a new field containing a single varint value.
|
void |
readAllFields(RawProtoStreamReader input)
Parse an entire message from
input and merge its fields into this set. |
void |
readExternal(ObjectInput in) |
boolean |
readSingleField(int tag,
RawProtoStreamReader input)
Parse a single field from
input and merge it into this set. |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
void |
writeTo(RawProtoStreamWriter output)
Writes all fields from this set to the
output stream. |
public boolean isEmpty()
UnknownFieldSet
isEmpty
in interface UnknownFieldSet
public void readAllFields(RawProtoStreamReader input) throws IOException
UnknownFieldSet
input
and merge its fields into this set.readAllFields
in interface UnknownFieldSet
IOException
public boolean readSingleField(int tag, RawProtoStreamReader input) throws IOException
UnknownFieldSet
input
and merge it into this set.readSingleField
in interface UnknownFieldSet
tag
- The field's tag number, which was already parsed (tag contains both field id and wire type).false
if the tag is an end group tag.IOException
public void putVarintField(int tag, int value)
UnknownFieldSet
putVarintField
in interface UnknownFieldSet
tag
- the field tag (containing both field id and wire type).public void writeTo(RawProtoStreamWriter output) throws IOException
UnknownFieldSet
output
stream.writeTo
in interface UnknownFieldSet
IOException
public <A> A consumeTag(int tag)
UnknownFieldSet
consumeTag
in interface UnknownFieldSet
A
- The expected type of the tag value.tag
- the field tag (containing both field id and wire type).public boolean hasTag(int tag)
UnknownFieldSet
hasTag
in interface UnknownFieldSet
tag
- the field tag (containing both field id and wire type).public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.