Public Member Functions | List of all members
com.google.protobuf.Parser< MessageType > Interface Template Reference
Inheritance diagram for com.google.protobuf.Parser< MessageType >:
Inheritance graph
[legend]

Public Member Functions

MessageType parseDelimitedFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parseDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, int off, int len) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteBuffer data) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteString data) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (CodedInputStream input) throws InvalidProtocolBufferException
 
MessageType parseFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parseFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialDelimitedFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, int off, int len) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (ByteString data) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (CodedInputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 

Detailed Description

Abstract interface for parsing Protocol Messages.

The implementation should be stateless and thread-safe.

All methods may throw InvalidProtocolBufferException. In the event of invalid data, like an encoding error, the cause of the thrown exception will be

null

. However, if an I/O problem occurs, an exception is thrown with an java.io.IOException cause.

Author
liuji.nosp@m.si@g.nosp@m.oogle.nosp@m..com (Pherl Liu)

Definition at line 47 of file Parser.java.

Member Function Documentation

◆ parseDelimitedFrom() [1/2]

MessageType com.google.protobuf.Parser< MessageType >.parseDelimitedFrom ( InputStream  input) throws InvalidProtocolBufferException

◆ parseDelimitedFrom() [2/2]

MessageType com.google.protobuf.Parser< MessageType >.parseDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ parseFrom() [1/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( byte[]  data) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [2/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [3/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [4/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [5/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( ByteBuffer  data) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [6/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( ByteBuffer  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [7/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( ByteString  data) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [8/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [9/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( CodedInputStream  input) throws InvalidProtocolBufferException

Parses a message of

MessageType

from the input.

Note: The caller should call CodedInputStream#checkLastTagWas(int) after calling this to verify that the last tag seen was the appropriate end-group tag, or zero for EOF.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [10/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in

extensionRegistry

. Extensions not in the registry will be treated as unknown fields.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [11/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( InputStream  input) throws InvalidProtocolBufferException

Parse a message of

MessageType

from

. This is just a small wrapper around parseFrom(CodedInputStream). Note that this method always reads the entire input (unless it throws an exception). If you want it to stop earlier, you will need to wrap your input in some wrapper stream that limits reading. Or, use {} to write your message and { #parseDelimitedFrom(InputStream)} to read it. Despite usually reading the entire input, this does not close the stream.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parseFrom() [12/12]

MessageType com.google.protobuf.Parser< MessageType >.parseFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Parses a message of

MessageType

from

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialDelimitedFrom() [1/2]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialDelimitedFrom ( InputStream  input) throws InvalidProtocolBufferException

Like parseDelimitedFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialDelimitedFrom() [2/2]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseDelimitedFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [1/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( byte[]  data) throws InvalidProtocolBufferException

Like parseFrom(byte[]), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [2/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(byte[], ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [3/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException

Like parseFrom(byte[], int, int), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [4/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [5/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( ByteString  data) throws InvalidProtocolBufferException

Like parseFrom(ByteString), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [6/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [7/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( CodedInputStream  input) throws InvalidProtocolBufferException

Like parseFrom(CodedInputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [8/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(CodedInputStream input, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

◆ parsePartialFrom() [9/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( InputStream  input) throws InvalidProtocolBufferException

Like parseFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.

◆ parsePartialFrom() [10/10]

MessageType com.google.protobuf.Parser< MessageType >.parsePartialFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

Like parseFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implemented in com.google.protobuf.AbstractParser< MessageType extends MessageLite >.


The documentation for this interface was generated from the following file:
input
std::string input
Definition: tokenizer_unittest.cc:197
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:07