MessageLite interface which implements as many methods of
that interface as possible in terms of other methods.
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | AbstractMessageLite.Builder<MessageType extends AbstractMessageLite
A partial implementation of the |
| Modifier and Type | Field and Description |
|---|---|
| protected int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected static <T> void | |
| protected static <T> void | |
| protected static void | |
| pack-priv int | |
| private String | |
| pack-priv UninitializedMessageException | newUninitializedMessageException()
Package private helper method for AbstractParser to create UninitializedMessageException. |
| pack-priv void | |
| public byte[] | toByteArray()
Implements com. byte array and returns it.
|
| public ByteString | toByteString()
Implements com. ByteString and returns it.
|
| public void | writeDelimitedTo(final OutputStream output)
Implements com. writeTo(OutputStream), but writes the size of the message as a varint before
writing the data.
|
| public void | writeTo(final OutputStream output)
Implements com. output.
|
| memoizedHashCode | back to summary |
|---|---|
| protected int memoizedHashCode | |
| AbstractMessageLite | back to summary |
|---|---|
| public AbstractMessageLite() | |
| addAll | back to summary |
|---|---|
| protected static <T> void addAll(final Iterable<T> values, final Collection<? super T> list)
Deprecated
| |
| addAll | back to summary |
|---|---|
| protected static <T> void addAll(final Iterable<T> values, final List<? super T> list) | |
| checkByteStringIsUtf8 | back to summary |
|---|---|
| protected static void checkByteStringIsUtf8(ByteString byteString) throws IllegalArgumentException | |
| getMemoizedSerializedSize | back to summary |
|---|---|
| pack-priv int getMemoizedSerializedSize() | |
| getSerializingExceptionMessage | back to summary |
|---|---|
| private String getSerializingExceptionMessage(String target) | |
| newUninitializedMessageException | back to summary |
|---|---|
| pack-priv UninitializedMessageException newUninitializedMessageException() Package private helper method for AbstractParser to create UninitializedMessageException. | |
| setMemoizedSerializedSize | back to summary |
|---|---|
| pack-priv void setMemoizedSerializedSize(int size) | |
| toByteArray | back to summary |
|---|---|
| public byte[] toByteArray() Implements com. Doc from com. Serializes the message to a
| |
| toByteString | back to summary |
|---|---|
| public ByteString toByteString() Implements com. Doc from com. Serializes the message to a
| |
| writeDelimitedTo | back to summary |
|---|---|
| public void writeDelimitedTo(final OutputStream output) throws IOException Implements com. Doc from com. Like
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream output) throws IOException Implements com. Doc from com. Serializes the message and writes it to Note Protocol Buffers are not self-delimiting. Therefore, if you write any more data to the
stream after the message, you must somehow ensure that the parser on the receiving end does not
interpret this as being part of the protocol message. This can be done e.g. by writing the size
of the message before the data, then making sure to limit the input to that size on the
receiving end (e.g. by wrapping the InputStream in one which limits the input). Alternatively,
just use
| |
Message.Builder interface which implements as many
methods of that interface as possible in terms of other methods.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | AbstractMessageLite.Builder.LimitedInputStream
An InputStream implementations which reads from some other InputStream but is limited to a particular number of bytes. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected static <T> void | |
| protected static <T> void | |
| private static <T> void | |
| public abstract BuilderType | clone()
Redeclares com. Overrides java. |
| private String | |
| protected abstract BuilderType | |
| public boolean | mergeDelimitedFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry)
Implements com. mergeDelimitedFrom(InputStream) but supporting extensions.
|
| public boolean | mergeDelimitedFrom(final InputStream input)
Implements com. mergeFrom(InputStream), but does not read until EOF.
|
| public BuilderType | mergeFrom(final CodedInputStream input)
Implements com. |
| public abstract BuilderType | mergeFrom(final CodedInputStream input, final ExtensionRegistryLite extensionRegistry)
Redeclares com. Builder#mergeFrom(CodedInputStream), but also parses extensions.
|
| public BuilderType | mergeFrom(final ByteString data)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final ByteString data, final ExtensionRegistryLite extensionRegistry)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final byte[] data)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final byte[] data, final int off, final int len)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final byte[] data, final int off, final int len, final ExtensionRegistryLite extensionRegistry)
Implements com. data as a message of this type and merge it with the message being built.
|
| public BuilderType | mergeFrom(final InputStream input)
Implements com. input and merge it with the message being built.
|
| public BuilderType | mergeFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry)
Implements com. input and merge it with the message being built.
|
| public BuilderType | mergeFrom(final MessageLite other)
Implements com. other into the message being built.
|
| protected static UninitializedMessageException | newUninitializedMessageException(MessageLite message)
Construct an UninitializedMessageException reporting missing fields in the given message. |
| Builder | back to summary |
|---|---|
| public Builder() | |
| addAll | back to summary |
|---|---|
| protected static <T> void addAll(final Iterable<T> values, final Collection<? super T> list)
Deprecated
| |
| addAll | back to summary |
|---|---|
| protected static <T> void addAll(final Iterable<T> values, final List<? super T> list) Adds the
| |
| addAllCheckingNulls | back to summary |
|---|---|
| private static <T> void addAllCheckingNulls(Iterable<T> values, List<? super T> list) | |
| clone | back to summary |
|---|---|
| public abstract BuilderType clone() Redeclares com. Overrides java. Doc from com. Clones the Builder.
| |
| getReadingExceptionMessage | back to summary |
|---|---|
| private String getReadingExceptionMessage(String target) | |
| internalMergeFrom | back to summary |
|---|---|
| protected abstract BuilderType internalMergeFrom(MessageType message) | |
| mergeDelimitedFrom | back to summary |
|---|---|
| public boolean mergeDelimitedFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException Implements com. Doc from com. Like
| |
| mergeDelimitedFrom | back to summary |
|---|---|
| public boolean mergeDelimitedFrom(final InputStream input) throws IOException Implements com. Doc from com. Like
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final CodedInputStream input) throws IOException Implements com. Doc from com. 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
Note The caller should call
| |
| mergeFrom | back to summary |
|---|---|
| public abstract BuilderType mergeFrom(final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException Redeclares com. Doc from com. Like
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final ByteString data) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final ByteString data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final byte[] data) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final byte[] data, final int off, final int len) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final byte[] data, final int off, final int len, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException Implements com. Doc from com. Parse
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final InputStream input) throws IOException Implements com. Doc from com. Parse a message of this type from Despite usually reading the entire input, this does not close the stream.
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException Implements com. Doc from com. Parse a message of this type from
| |
| mergeFrom | back to summary |
|---|---|
| public BuilderType mergeFrom(final MessageLite other) Implements com. Doc from com. Merge Merging occurs as follows. For each field: This is equivalent to the
| |
| newUninitializedMessageException | back to summary |
|---|---|
| protected static UninitializedMessageException newUninitializedMessageException(MessageLite message) Construct an UninitializedMessageException reporting missing fields in the given message. | |
| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. |
| public int | |
| public int | read(final byte[]
the buffer into which the data is read. b, final int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from this input stream
into an array of bytes.
|
| public long | skip(final long
the number of bytes to be skipped. n)Overrides java. n bytes of data from the
input stream.
|
| limit | back to summary |
|---|---|
| private int limit | |
| LimitedInputStream | back to summary |
|---|---|
| pack-priv LimitedInputStream(InputStream in, int limit) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(final byte[] b, final int off, int len) throws IOException Overrides java. Doc from java. Reads up to
| |
| skip | back to summary |
|---|---|
| public long skip(final long n) throws IOException Overrides java. Doc from java. Skips over and discards
| |