public static final class UnknownFieldSet.Field extends Object
UnknownFieldSet.
A Field consists of five lists of values. The lists correspond to the five "wire types" used in the protocol buffer binary format. The wire type of each field can be determined from the encoded form alone, without knowing the field's declared type. So, we are able to parse unknown values at least this far and separate them. Normally, only one of the five lists will contain any values, since it is impossible to define a valid message type that declares two different types for the same field number. However, the code is designed to allow for the case where the same unknown field number is encountered using multiple different wire types.
Field is an immutable class. To construct one, you must use a UnknownFieldSet.Field.Builder.
UnknownFieldSet
| Modifier and Type | Class and Description |
|---|---|
static class |
UnknownFieldSet
Used to build a
UnknownFieldSet.Field within an
UnknownFieldSet.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object
|
static UnknownFieldSet |
getDefaultInstance()
Get an empty
Field.
|
List |
getFixed32List()
Get the list of fixed32 values for this field.
|
List |
getFixed64List()
Get the list of fixed64 values for this field.
|
List |
getGroupList()
Get the list of embedded group values for this field.
|
List |
getLengthDelimitedList()
Get the list of length-delimited values for this field.
|
int |
getSerializedSize(int fieldNumber)
Get the number of bytes required to encode this field, including field number.
|
int |
getSerializedSizeAsMessageSetExtension(int fieldNumber)
Get the number of bytes required to encode this field, including field number, using
MessageSet wire format.
|
List |
getVarintList()
Get the list of varint values for this field.
|
int |
hashCode()
|
static UnknownFieldSet |
newBuilder()
Construct a new
UnknownFieldSet.Field.Builder.
|
static UnknownFieldSet |
newBuilder(UnknownFieldSet
Construct a new
UnknownFieldSet.Field.Builder and initialize it to a copy of
copyFrom.
|
void |
writeAsMessageSetExtensionTo(int fieldNumber, CodedOutputStream
Serializes the field, including field number, and writes it to
output, using
MessageSet wire format.
|
void |
writeTo(int fieldNumber, CodedOutputStream
Serializes the field, including field number, and writes it to
output.
|
public static UnknownFieldSet.Field .Builder newBuilder()
UnknownFieldSet.Field.Builder.
public static UnknownFieldSet.Field .Builder newBuilder(UnknownFieldSet .Field copyFrom)
UnknownFieldSet.Field.Builder and initialize it to a copy of
copyFrom.
public static UnknownFieldSet.Field getDefaultInstance()
Field.
public List<ByteString > getLengthDelimitedList()
public List<UnknownFieldSet > getGroupList()
UnknownFieldSets rather than
Messages since the group's type is presumably unknown.
public boolean equals(Objectother)
public int hashCode()
public void writeTo(int fieldNumber,
CodedOutputStream output)
throws IOException
output.
IOException
public int getSerializedSize(int fieldNumber)
public void writeAsMessageSetExtensionTo(int fieldNumber,
CodedOutputStream output)
throws IOException
output, using
MessageSet wire format.
IOException
public int getSerializedSizeAsMessageSetExtension(int fieldNumber)
MessageSet wire format.