Classes | Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType > Class Template Referenceabstract
Inheritance diagram for com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >:
Inheritance graph
[legend]

Classes

class  Builder
 

Public Member Functions

byte[] toByteArray ()
 
ByteString toByteString ()
 
void writeDelimitedTo (final OutputStream output) throws IOException
 
void writeTo (final OutputStream output) throws IOException
 
- Public Member Functions inherited from com.google.protobuf.MessageLite
Parser<? extends MessageLitegetParserForType ()
 
int getSerializedSize ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
void writeTo (CodedOutputStream output) throws IOException
 
- Public Member Functions inherited from com.google.protobuf.MessageLiteOrBuilder
MessageLite getDefaultInstanceForType ()
 
boolean isInitialized ()
 

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 void checkByteStringIsUtf8 (ByteString byteString) throws IllegalArgumentException
 

Protected Attributes

int memoizedHashCode = 0
 

Private Member Functions

String getSerializingExceptionMessage (String target)
 

Detailed Description

A partial implementation of the MessageLite interface which implements as many methods of that interface as possible in terms of other methods.

Author
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

Definition at line 49 of file AbstractMessageLite.java.

Member Function Documentation

◆ addAll() [1/2]

static <T> void com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.addAll ( final Iterable< T values,
final Collection<? super T list 
)
inlinestaticprotected

Definition at line 141 of file AbstractMessageLite.java.

◆ addAll() [2/2]

static <T> void com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.addAll ( final Iterable< T values,
final List<? super T list 
)
inlinestaticprotected

Definition at line 145 of file AbstractMessageLite.java.

◆ checkByteStringIsUtf8()

static void com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.checkByteStringIsUtf8 ( ByteString  byteString) throws IllegalArgumentException
inlinestaticprotected

Definition at line 132 of file AbstractMessageLite.java.

◆ getSerializingExceptionMessage()

String com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.getSerializingExceptionMessage ( String  target)
inlineprivate

Definition at line 124 of file AbstractMessageLite.java.

◆ toByteArray()

byte [] com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.toByteArray ( )
inline

Serializes the message to a

byte

array and returns it. This is just a trivial wrapper around writeTo(CodedOutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 67 of file AbstractMessageLite.java.

◆ toByteString()

ByteString com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.toByteString ( )
inline

Serializes the message to a

ByteString

and returns it. This is just a trivial wrapper around writeTo(CodedOutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 56 of file AbstractMessageLite.java.

◆ writeDelimitedTo()

void com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.writeDelimitedTo ( final OutputStream  output) throws IOException
inline

Like writeTo(OutputStream), but writes the size of the message as a varint before writing the data. This allows more data to be written to the stream after the message without the need to delimit the message data yourself. Use {} (or the static method YourMessageType.parseDelimitedFrom(InputStream) ) to parse messages written by this method.

Implements com.google.protobuf.MessageLite.

Definition at line 88 of file AbstractMessageLite.java.

◆ writeTo()

void com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.writeTo ( final OutputStream  output) throws IOException
inline

Serializes the message and writes it to

. This is just a trivial wrapper around writeTo(CodedOutputStream). This does not flush or close the stream.

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 writeDelimitedTo(OutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 80 of file AbstractMessageLite.java.

Member Data Documentation

◆ memoizedHashCode

int com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.memoizedHashCode = 0
protected

Definition at line 53 of file AbstractMessageLite.java.


The documentation for this class was generated from the following file:
output
const upb_json_parsermethod const upb_symtab upb_sink * output
Definition: ruby/ext/google/protobuf_c/upb.h:10503


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:06