public interface Parser<MessageType>
| Modifier and Type | Method and Description |
|---|---|
MessageType |
parseDelimitedFrom(InputStream
Like
parseFrom(InputStream), but does not read util EOF.
|
MessageType |
parseDelimitedFrom(InputStream
Like
parseDelimitedFrom(InputStream) but supporting extensions.
|
MessageType |
parseFrom(byte[] data)
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(byte[] data, ExtensionRegistryLite
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(byte[] data, int off, int len)
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(byte[] data, int off, int len, ExtensionRegistryLite
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(ByteString
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(ByteString
Parses
data as a message of
MessageType.
|
MessageType |
parseFrom(CodedInputStream
Parses a message of
MessageType from the input.
|
MessageType |
parseFrom(CodedInputStream
Like
parseFrom(CodedInputStream), but also parses extensions.
|
MessageType |
parseFrom(InputStream
Parse a message of
MessageType from
input.
|
MessageType |
parseFrom(InputStream
Parses a message of
MessageType from
input.
|
MessageType |
parsePartialDelimitedFrom(InputStream
Like
parseDelimitedFrom(InputStream), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialDelimitedFrom(InputStream
Like
parseDelimitedFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(byte[] data)
Like
parseFrom(byte[]), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(byte[] data, ExtensionRegistryLite
Like
parseFrom(byte[], ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(byte[] data, int off, int len)
Like
parseFrom(byte[], int, int), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(byte[] data, int off, int len, ExtensionRegistryLite
Like
parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(ByteString
Like
parseFrom(ByteString), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(ByteString
Like
parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(CodedInputStream
Like
parseFrom(CodedInputStream), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(CodedInputStream
Like
parseFrom(CodedInputStream input, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(InputStream
Like
parseFrom(InputStream), but does not throw an exception if the message is missing required fields.
|
MessageType |
parsePartialFrom(InputStream
Like
parseFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields.
|
MessageType parseFrom(CodedInputStreaminput) throws InvalidProtocolBufferException
MessageType from the input.
Note: The caller should call CodedInputStream after calling this to verify that the last tag seen was the appropriate end-group tag, or zero for EOF.
InvalidProtocolBufferException
MessageType parseFrom(CodedInputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
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.
InvalidProtocolBufferException
MessageType parsePartialFrom(CodedInputStreaminput) throws InvalidProtocolBufferException
parseFrom(CodedInputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(CodedInputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
parseFrom(CodedInputStream input, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parseFrom(ByteStringdata) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream).
InvalidProtocolBufferException
MessageType parseFrom(ByteStringdata, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream, ExtensionRegistryLite).
InvalidProtocolBufferException
MessageType parsePartialFrom(ByteStringdata) throws InvalidProtocolBufferException
parseFrom(ByteString), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(ByteStringdata, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parseFrom(byte[] data, int off, int len) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream).
InvalidProtocolBufferException
MessageType parseFrom(byte[] data, int off, int len, ExtensionRegistryLiteextensionRegistry) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream, ExtensionRegistryLite).
InvalidProtocolBufferException
MessageType parseFrom(byte[] data) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream).
InvalidProtocolBufferException
MessageType parseFrom(byte[] data, ExtensionRegistryLiteextensionRegistry) throws InvalidProtocolBufferException
data as a message of
MessageType. This is just a small wrapper around
parseFrom(CodedInputStream, ExtensionRegistryLite).
InvalidProtocolBufferException
MessageType parsePartialFrom(byte[] data, int off, int len) throws InvalidProtocolBufferException
parseFrom(byte[], int, int), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(byte[] data, int off, int len, ExtensionRegistryLiteextensionRegistry) throws InvalidProtocolBufferException
parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(byte[] data) throws InvalidProtocolBufferException
parseFrom(byte[]), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(byte[] data, ExtensionRegistryLiteextensionRegistry) throws InvalidProtocolBufferException
parseFrom(byte[], ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parseFrom(InputStreaminput) throws InvalidProtocolBufferException
MessageType from
input. 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
MessageLite.writeDelimitedTo(java.io.OutputStream) to write your message and
parseDelimitedFrom(InputStream) to read it.
Despite usually reading the entire input, this does not close the stream.
InvalidProtocolBufferException
MessageType parseFrom(InputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
MessageType from
input. This is just a small wrapper around
parseFrom(CodedInputStream, ExtensionRegistryLite).
InvalidProtocolBufferException
MessageType parsePartialFrom(InputStreaminput) throws InvalidProtocolBufferException
parseFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialFrom(InputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
parseFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parseDelimitedFrom(InputStreaminput) throws InvalidProtocolBufferException
parseFrom(InputStream), but does not read util EOF. Instead, the size of message (encoded as a varint) is read first, then the message data. Use
MessageLite.writeDelimitedTo(java.io.OutputStream) to write messages in this format.
InvalidProtocolBufferException
MessageType parseDelimitedFrom(InputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
parseDelimitedFrom(InputStream) but supporting extensions.
InvalidProtocolBufferException
MessageType parsePartialDelimitedFrom(InputStreaminput) throws InvalidProtocolBufferException
parseDelimitedFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException
MessageType parsePartialDelimitedFrom(InputStreaminput, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
parseDelimitedFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.
InvalidProtocolBufferException