Abstract interface implemented by Protocol Message objects.
- Author
- wink@.nosp@m.goog.nosp@m.le.co.nosp@m.m Wink Saville
◆ clone()
MessageNano com.google.protobuf.nano.MessageNano.clone |
( |
void |
| ) |
throws CloneNotSupportedException |
|
inline |
Provides support for cloning. This only works if you specify the generate_clone method.
◆ computeSerializedSize()
int com.google.protobuf.nano.MessageNano.computeSerializedSize |
( |
| ) |
|
|
inlineprotected |
Computes the number of bytes required to encode this message. This does not update the cached size.
◆ getCachedSize()
int com.google.protobuf.nano.MessageNano.getCachedSize |
( |
| ) |
|
|
inline |
Get the number of bytes required to encode this message. Returns the cached size or calls getSerializedSize which sets the cached size. This is used internally when serializing so the size is only computed once. If a member is modified then this could be stale call getSerializedSize if in doubt.
◆ getSerializedSize()
int com.google.protobuf.nano.MessageNano.getSerializedSize |
( |
| ) |
|
|
inline |
Computes the number of bytes required to encode this message. The size is cached and the cached result can be retrieved using getCachedSize().
◆ mergeFrom() [1/3]
Parse
as a message of this type and merge it with the message being built.
◆ mergeFrom() [2/3]
Parse
as a message of this type and merge it with the message being built.
◆ mergeFrom() [3/3]
Parse
as a message of this type and merge it with the message being built.
◆ messageNanoEquals()
Compares two
s and returns true if the message's are the same class and have serialized form equality (i.e. all of the field values are the same).
◆ toByteArray() [1/2]
static final byte [] com.google.protobuf.nano.MessageNano.toByteArray |
( |
MessageNano |
msg | ) |
|
|
inlinestatic |
Serialize to a byte array.
- Returns
- byte array with the serialized data.
◆ toByteArray() [2/2]
static final void com.google.protobuf.nano.MessageNano.toByteArray |
( |
MessageNano |
msg, |
|
|
byte [] |
data, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inlinestatic |
Serialize to a byte array starting at offset through length. The method getSerializedSize must have been called prior to calling this method so the proper length is know. If an attempt to write more than length bytes OutOfSpaceException will be thrown and if length bytes are not written then IllegalStateException is thrown.
◆ toString()
String com.google.protobuf.nano.MessageNano.toString |
( |
| ) |
|
|
inline |
Returns a string that is (mostly) compatible with ProtoBuffer's TextFormat. Note that groups (which are deprecated) are not serialized with the correct field name.
This is implemented using reflection, so it is not especially fast nor is it guaranteed to find all fields if you have method removal turned on for proguard.
◆ writeTo()
Serializes the message and writes it to
.
- Parameters
-
output | the output to receive the serialized form. |
- Exceptions
-
IOException | if an error occurred writing to . |
◆ cachedSize
volatile int com.google.protobuf.nano.MessageNano.cachedSize = -1 |
|
protected |
The documentation for this class was generated from the following file:
- Source/ThirdParty/libwebrtc/Source/third_party/protobuf/javanano/src/main/java/com/google/protobuf/nano/MessageNano.java