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

Name Description
T

Constructors

DefaultInstanceBasedParser(T defaultInstance)

public DefaultInstanceBasedParser(T defaultInstance)
Parameter
Name Description
defaultInstance T

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
Name Description
input byte[]
offset int
length int
extensionRegistry ExtensionRegistryLite
Returns
Type Description
T
Overrides
Exceptions
Type Description
InvalidProtocolBufferException

parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public T parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
T
Exceptions
Type Description
InvalidProtocolBufferException