Class GeneratedMessageLite.DefaultInstanceBasedParser<T> (3.19.4)

protected static class GeneratedMessageLite.DefaultInstanceBasedParser<T> extends AbstractParser<T>

A Parser implementation that delegates to the default instance.

For use by generated code only.

Inheritance

java.lang.Object > AbstractParser > GeneratedMessageLite.DefaultInstanceBasedParser<T>

Type Parameter

NameDescription
T

Constructors

DefaultInstanceBasedParser(T defaultInstance)

public DefaultInstanceBasedParser(T defaultInstance)
Parameter
NameDescription
defaultInstanceT

Methods

parsePartialFrom(byte[] input, int offset, int length, ExtensionRegistryLite extensionRegistry)

public T parsePartialFrom(byte[] input, int offset, int length, ExtensionRegistryLite extensionRegistry)

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

Parameters
NameDescription
inputbyte[]
offsetint
lengthint
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
T
Overrides
Exceptions
TypeDescription
InvalidProtocolBufferException

parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public T parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
T
Exceptions
TypeDescription
InvalidProtocolBufferException