public abstract class ExtendableMessageNano<M extends ExtendableMessageNano<M>> extends MessageNano
| Modifier and Type | Field and Description |
|---|---|
protected FieldArray |
unknownFieldData
A container for fields unknown to the message, including extensions.
|
cachedSize| Constructor and Description |
|---|
ExtendableMessageNano() |
| Modifier and Type | Method and Description |
|---|---|
M |
clone()
Provides support for cloning.
|
protected int |
computeSerializedSize()
Computes the number of bytes required to encode this message.
|
<T> T |
getExtension(Extension<M,T> extension)
Gets the value stored in the specified extension of this message.
|
boolean |
hasExtension(Extension<M,?> extension)
Checks if there is a value stored for the specified extension in this
message.
|
<T> M |
setExtension(Extension<M,T> extension,
T value)
Sets the value of the specified extension of this message.
|
protected boolean |
storeUnknownField(CodedInputByteBufferNano input,
int tag)
Stores the binary data of an unknown field.
|
void |
writeTo(CodedOutputByteBufferNano output)
Serializes the message and writes it to
output. |
getCachedSize, getSerializedSize, mergeFrom, mergeFrom, mergeFrom, messageNanoEquals, toByteArray, toByteArray, toStringprotected FieldArray unknownFieldData
getExtension(com.google.protobuf.nano.Extension<M, T>) and setExtension(com.google.protobuf.nano.Extension<M, T>, T) methods.protected int computeSerializedSize()
MessageNanocomputeSerializedSize in class MessageNanopublic void writeTo(CodedOutputByteBufferNano output) throws IOException
MessageNanooutput.writeTo in class MessageNanooutput - the output to receive the serialized form.IOException - if an error occurred writing to output.public final boolean hasExtension(Extension<M,?> extension)
public final <T> T getExtension(Extension<M,T> extension)
public final <T> M setExtension(Extension<M,T> extension, T value)
protected final boolean storeUnknownField(CodedInputByteBufferNano input, int tag) throws IOException
Generated messages will call this for unknown fields if the store_unknown_fields option is on.
Note that the tag might be a end-group tag (rather than the start of an unknown field) in which case we do not want to add an unknown field entry.
input - the input buffer.tag - the tag of the field.IOExceptionpublic M clone() throws CloneNotSupportedException
MessageNanoclone in class MessageNanoCloneNotSupportedExceptionCopyright © 2008–2016 Google. All rights reserved.