Classes | |
class | LimitedInputStream |
Public Member Functions | |
abstract BuilderType | clone () |
boolean | mergeDelimitedFrom (final InputStream input) throws IOException |
boolean | mergeDelimitedFrom (final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException |
BuilderType | mergeFrom (final byte[] data) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final byte[] data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final byte[] data, final int off, final int len) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final byte[] data, final int off, final int len, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final ByteString data) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final ByteString data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
BuilderType | mergeFrom (final CodedInputStream input) throws IOException |
abstract BuilderType | mergeFrom (final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException |
BuilderType | mergeFrom (final InputStream input) throws IOException |
BuilderType | mergeFrom (final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException |
BuilderType | mergeFrom (final MessageLite other) |
![]() | |
MessageLite | build () |
MessageLite | buildPartial () |
Builder | clear () |
![]() | |
MessageLite | getDefaultInstanceForType () |
boolean | isInitialized () |
Protected Member Functions | |
abstract BuilderType | internalMergeFrom (MessageType message) |
Static Protected Member Functions | |
static< T > void | addAll (final Iterable< T > values, final Collection<? super T > list) |
static< T > void | addAll (final Iterable< T > values, final List<? super T > list) |
static UninitializedMessageException | newUninitializedMessageException (MessageLite message) |
Private Member Functions | |
String | getReadingExceptionMessage (String target) |
Static Private Member Functions | |
static< T > void | addAllCheckingNulls (Iterable< T > values, List<? super T > list) |
A partial implementation of the Message.Builder interface which implements as many methods of that interface as possible in terms of other methods.
Definition at line 154 of file AbstractMessageLite.java.
|
inlinestaticprotected |
Definition at line 384 of file AbstractMessageLite.java.
|
inlinestaticprotected |
Adds the
to the
. This is a helper method used by generated code. Users should ignore it.
NullPointerException | if or any of the elements of is null. |
Definition at line 395 of file AbstractMessageLite.java.
|
inlinestaticprivate |
Definition at line 358 of file AbstractMessageLite.java.
|
abstract |
Clones the Builder.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
|
inlineprivate |
Definition at line 349 of file AbstractMessageLite.java.
|
abstractprotected |
|
inline |
Like mergeFrom(InputStream), but does not read until EOF. Instead, the size of the message (encoded as a varint) is read first, then the message data. Use {} to write messages in this format. True if successful, or false if the stream is at EOF when the method starts. Any other error (including reaching EOF during parsing) will cause an exception to be thrown.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 332 of file AbstractMessageLite.java.
|
inline |
Like mergeDelimitedFrom(InputStream) but supporting extensions.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 319 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 204 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 224 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 209 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 230 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 174 of file AbstractMessageLite.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 188 of file AbstractMessageLite.java.
|
inline |
Parses a message of this type from the input and merges it with this message.
Warning: This does not verify that all required fields are present in the input message. If you call build() without setting all required fields, it will throw an {}, which is a RuntimeException and thus might not be caught. There are a few good ways to deal with this: Call isInitialized() to verify that all required fields are set before building. Use
to build, which ignores missing required fields.
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.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 163 of file AbstractMessageLite.java.
|
abstract |
Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in
. Extensions not in the registry will be treated as unknown fields.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
|
inline |
Parse a message of this type from
and merge it with the message being built. This is just a small wrapper around mergeFrom(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(OutputStream) to write your message and {} to read it. Despite usually reading the entire input, this does not close the stream.
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 249 of file AbstractMessageLite.java.
|
inline |
Parse a message of this type from
and merge it with the message being built. This is just a small wrapper around {}. this
Implements com.google.protobuf.MessageLite.Builder.
Reimplemented in com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >.
Definition at line 257 of file AbstractMessageLite.java.
|
inline |
Merge
into the message being built.
must have the exact same type as
(i.e.
).
Merging occurs as follows. For each field:
This is equivalent to the
method in C++.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 338 of file AbstractMessageLite.java.
|
inlinestaticprotected |
Construct an UninitializedMessageException reporting missing fields in the given message.
Definition at line 377 of file AbstractMessageLite.java.