public abstract class BaseMessage<T> extends Object implements Message<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
memoizedSerializedSize |
| Constructor and Description |
|---|
BaseMessage() |
| Modifier and Type | Method and Description |
|---|---|
protected static <T> void |
addAll(Iterable<T> values,
Collection<? super T> list) |
T |
assertInitialized() |
protected T |
checktInitialized() |
void |
clear() |
abstract T |
clone() |
protected static int |
computeGroupSize(int tag,
BaseMessage message) |
protected static int |
computeMessageSize(int tag,
BaseMessage message) |
boolean |
isInitialized() |
protected void |
load() |
protected void |
loadAndClear() |
T |
mergeFramed(Buffer data) |
T |
mergeFramed(byte[] data) |
T |
mergeFramed(CodedInputStream input) |
T |
mergeFramed(InputStream input) |
T |
mergeFrom(T other) |
T |
mergeUnframed(Buffer data) |
T |
mergeUnframed(byte[] data) |
T |
mergeUnframed(InputStream input) |
ArrayList<String> |
missingFields() |
protected List<String> |
prefix(List<String> missingFields,
String prefix) |
protected static <T extends BaseMessage> |
readGroup(CodedInputStream input,
int tag,
T group) |
protected static byte |
readRawByte(InputStream is) |
static int |
readRawVarint32(InputStream is)
Read a raw Varint from the stream.
|
int |
serializedSizeFramed() |
Buffer |
toFramedBuffer() |
byte[] |
toFramedByteArray() |
Buffer |
toUnframedBuffer() |
byte[] |
toUnframedByteArray() |
void |
writeFramed(CodedOutputStream output) |
void |
writeFramed(OutputStream output) |
protected static void |
writeGroup(CodedOutputStream output,
int tag,
BaseMessage message) |
protected static void |
writeMessage(CodedOutputStream output,
int tag,
BaseMessage message) |
void |
writeUnframed(CodedOutputStream output) |
void |
writeUnframed(OutputStream output) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmergeUnframed, serializedSizeUnframedpublic abstract T clone() throws CloneNotSupportedException
public boolean isInitialized()
public T assertInitialized() throws UninitializedMessageException
assertInitialized in interface Message<T>UninitializedMessageExceptionprotected T checktInitialized() throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionprotected void loadAndClear()
protected void load()
public void writeUnframed(CodedOutputStream output) throws IOException
writeUnframed in interface Message<T>IOExceptionpublic void writeFramed(CodedOutputStream output) throws IOException
writeFramed in interface Message<T>IOExceptionpublic Buffer toUnframedBuffer()
toUnframedBuffer in interface Message<T>public Buffer toFramedBuffer()
toFramedBuffer in interface Message<T>public byte[] toUnframedByteArray()
toUnframedByteArray in interface Message<T>public byte[] toFramedByteArray()
toFramedByteArray in interface Message<T>public void writeFramed(OutputStream output) throws IOException
writeFramed in interface Message<T>IOExceptionpublic void writeUnframed(OutputStream output) throws IOException
writeUnframed in interface Message<T>IOExceptionpublic int serializedSizeFramed()
serializedSizeFramed in interface Message<T>public T mergeFramed(CodedInputStream input) throws IOException
mergeFramed in interface Message<T>IOExceptionpublic T mergeUnframed(Buffer data) throws InvalidProtocolBufferException
mergeUnframed in interface Message<T>InvalidProtocolBufferExceptionpublic T mergeFramed(Buffer data) throws InvalidProtocolBufferException
mergeFramed in interface Message<T>InvalidProtocolBufferExceptionpublic T mergeUnframed(byte[] data) throws InvalidProtocolBufferException
mergeUnframed in interface Message<T>InvalidProtocolBufferExceptionpublic T mergeFramed(byte[] data) throws InvalidProtocolBufferException
mergeFramed in interface Message<T>InvalidProtocolBufferExceptionpublic T mergeUnframed(InputStream input) throws IOException
mergeUnframed in interface Message<T>IOExceptionpublic T mergeFramed(InputStream input) throws IOException
mergeFramed in interface Message<T>IOExceptionprotected static <T> void addAll(Iterable<T> values, Collection<? super T> list)
protected static void writeGroup(CodedOutputStream output, int tag, BaseMessage message) throws IOException
IOExceptionprotected static <T extends BaseMessage> T readGroup(CodedInputStream input, int tag, T group) throws IOException
IOExceptionprotected static int computeGroupSize(int tag,
BaseMessage message)
protected static void writeMessage(CodedOutputStream output, int tag, BaseMessage message) throws IOException
IOExceptionprotected static int computeMessageSize(int tag,
BaseMessage message)
public static int readRawVarint32(InputStream is) throws IOException
IOExceptionprotected static byte readRawByte(InputStream is) throws IOException
IOExceptionCopyright © 2012 Apache Software Foundation. All Rights Reserved.