public final class UnknownFieldSetImpl extends Object implements UnknownFieldSet, Externalizable
UnknownFieldSet implementation. This is not thread-safe. 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()
UnknownFieldSetisEmpty in interface UnknownFieldSetpublic void readAllFields(RawProtoStreamReader input) throws IOException
UnknownFieldSetinput and merge its fields into this set.readAllFields in interface UnknownFieldSetIOExceptionpublic boolean readSingleField(int tag,
RawProtoStreamReader input)
throws IOException
UnknownFieldSetinput and merge it into this set.readSingleField in interface UnknownFieldSettag - 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.IOExceptionpublic void putVarintField(int tag,
int value)
UnknownFieldSetputVarintField in interface UnknownFieldSettag - the field tag (containing both field id and wire type).public void writeTo(RawProtoStreamWriter output) throws IOException
UnknownFieldSetoutput stream.writeTo in interface UnknownFieldSetIOExceptionpublic <A> A consumeTag(int tag)
UnknownFieldSetconsumeTag in interface UnknownFieldSetA - The expected type of the tag value.tag - the field tag (containing both field id and wire type).public boolean hasTag(int tag)
UnknownFieldSethasTag in interface UnknownFieldSettag - the field tag (containing both field id and wire type).public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2020 JBoss, a division of Red Hat. All rights reserved.