Class CodedInputStreamReader
java.lang.Object
com.google.protobuf.CodedInputStreamReader
A reader of fields from a serialized protobuf message.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprivate static final intprivate final CodedInputStreamprivate static final intprivate int(package private) static final intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CodedInputStreamReaderforCodedInput(CodedInputStream input) intintgetTag()<T> voidmergeGroupField(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) private <T> voidmergeGroupFieldInternal(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) <T> voidmergeMessageField(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) private <T> voidmergeMessageFieldInternal(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) booleanreadBool()voidreadBoolList(List<Boolean> target) voidreadBytesList(List<ByteString> target) doublevoidreadDoubleList(List<Double> target) intreadEnum()voidreadEnumList(List<Integer> target) private ObjectreadField(WireFormat.FieldType fieldType, Class<?> messageType, ExtensionRegistryLite extensionRegistry) intvoidreadFixed32List(List<Integer> target) longvoidreadFixed64List(List<Long> target) floatvoidreadFloatList(List<Float> target) private <T> TreadGroup(Schema<T> schema, ExtensionRegistryLite extensionRegistry) <T> TreadGroup(Class<T> clazz, ExtensionRegistryLite extensionRegistry) Deprecated.<T> TreadGroupBySchemaWithCheck(Schema<T> schema, ExtensionRegistryLite extensionRegistry) Deprecated.<T> voidreadGroupList(List<T> target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) Deprecated.<T> voidreadGroupList(List<T> target, Class<T> targetType, ExtensionRegistryLite extensionRegistry) Deprecated.intvoidreadInt32List(List<Integer> target) longvoidreadInt64List(List<Long> target) <K,V> void readMap(Map<K, V> target, MapEntryLite.Metadata<K, V> metadata, ExtensionRegistryLite extensionRegistry) private <T> TreadMessage(Schema<T> schema, ExtensionRegistryLite extensionRegistry) <T> TreadMessage(Class<T> clazz, ExtensionRegistryLite extensionRegistry) <T> TreadMessageBySchemaWithCheck(Schema<T> schema, ExtensionRegistryLite extensionRegistry) <T> voidreadMessageList(List<T> target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) <T> voidreadMessageList(List<T> target, Class<T> targetType, ExtensionRegistryLite extensionRegistry) intvoidreadSFixed32List(List<Integer> target) longvoidreadSFixed64List(List<Long> target) intvoidreadSInt32List(List<Integer> target) longvoidreadSInt64List(List<Long> target) voidreadStringList(List<String> target) voidreadStringListInternal(List<String> target, boolean requireUtf8) voidreadStringListRequireUtf8(List<String> target) intvoidreadUInt32List(List<Integer> target) longvoidreadUInt64List(List<Long> target) private voidrequirePosition(int expectedPosition) private voidrequireWireType(int requiredWireType) booleanbooleanprivate voidverifyPackedFixed32Length(int bytes) private voidverifyPackedFixed64Length(int bytes)
-
Field Details
-
READ_DONE
static final int READ_DONE- See Also:
-
FIXED32_MULTIPLE_MASK
private static final int FIXED32_MULTIPLE_MASK- See Also:
-
FIXED64_MULTIPLE_MASK
private static final int FIXED64_MULTIPLE_MASK- See Also:
-
NEXT_TAG_UNSET
private static final int NEXT_TAG_UNSET- See Also:
-
input
-
tag
private int tag -
endGroupTag
private int endGroupTag -
nextTag
private int nextTag
-
-
Constructor Details
-
CodedInputStreamReader
-
-
Method Details
-
forCodedInput
-
shouldDiscardUnknownFields
public boolean shouldDiscardUnknownFields() -
getFieldNumber
- Throws:
IOException
-
getTag
public int getTag() -
skipField
- Throws:
IOException
-
requireWireType
- Throws:
IOException
-
readDouble
- Throws:
IOException
-
readFloat
- Throws:
IOException
-
readUInt64
- Throws:
IOException
-
readInt64
- Throws:
IOException
-
readInt32
- Throws:
IOException
-
readFixed64
- Throws:
IOException
-
readFixed32
- Throws:
IOException
-
readBool
- Throws:
IOException
-
readString
- Throws:
IOException
-
readStringRequireUtf8
- Throws:
IOException
-
readMessage
public <T> T readMessage(Class<T> clazz, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readMessageBySchemaWithCheck
public <T> T readMessageBySchemaWithCheck(Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readGroup
@Deprecated public <T> T readGroup(Class<T> clazz, ExtensionRegistryLite extensionRegistry) throws IOException Deprecated.- Throws:
IOException
-
readGroupBySchemaWithCheck
@Deprecated public <T> T readGroupBySchemaWithCheck(Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException Deprecated.- Throws:
IOException
-
mergeMessageField
public <T> void mergeMessageField(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
mergeMessageFieldInternal
private <T> void mergeMessageFieldInternal(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readMessage
private <T> T readMessage(Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
mergeGroupField
public <T> void mergeGroupField(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
mergeGroupFieldInternal
private <T> void mergeGroupFieldInternal(T target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readGroup
private <T> T readGroup(Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readBytes
- Throws:
IOException
-
readUInt32
- Throws:
IOException
-
readEnum
- Throws:
IOException
-
readSFixed32
- Throws:
IOException
-
readSFixed64
- Throws:
IOException
-
readSInt32
- Throws:
IOException
-
readSInt64
- Throws:
IOException
-
readDoubleList
- Throws:
IOException
-
readFloatList
- Throws:
IOException
-
readUInt64List
- Throws:
IOException
-
readInt64List
- Throws:
IOException
-
readInt32List
- Throws:
IOException
-
readFixed64List
- Throws:
IOException
-
readFixed32List
- Throws:
IOException
-
readBoolList
- Throws:
IOException
-
readStringList
- Throws:
IOException
-
readStringListRequireUtf8
- Throws:
IOException
-
readStringListInternal
- Throws:
IOException
-
readMessageList
public <T> void readMessageList(List<T> target, Class<T> targetType, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readMessageList
public <T> void readMessageList(List<T> target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
readGroupList
@Deprecated public <T> void readGroupList(List<T> target, Class<T> targetType, ExtensionRegistryLite extensionRegistry) throws IOException Deprecated.- Throws:
IOException
-
readGroupList
@Deprecated public <T> void readGroupList(List<T> target, Schema<T> schema, ExtensionRegistryLite extensionRegistry) throws IOException Deprecated.- Throws:
IOException
-
readBytesList
- Throws:
IOException
-
readUInt32List
- Throws:
IOException
-
readEnumList
- Throws:
IOException
-
readSFixed32List
- Throws:
IOException
-
readSFixed64List
- Throws:
IOException
-
readSInt32List
- Throws:
IOException
-
readSInt64List
- Throws:
IOException
-
verifyPackedFixed64Length
- Throws:
IOException
-
readMap
public <K,V> void readMap(Map<K, V> target, MapEntryLite.Metadata<K, throws IOExceptionV> metadata, ExtensionRegistryLite extensionRegistry) - Throws:
IOException
-
readField
private Object readField(WireFormat.FieldType fieldType, Class<?> messageType, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
verifyPackedFixed32Length
- Throws:
IOException
-
requirePosition
- Throws:
IOException
-