public abstract class BaseMessage<T> extends Object implements Message<T>
Modifier and Type | Field and Description |
---|---|
protected int |
memoizedSerializedSize |
Constructor and Description |
---|
BaseMessage() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mergeUnframed, serializedSizeUnframed
public abstract T clone() throws CloneNotSupportedException
public boolean isInitialized()
public T assertInitialized() throws UninitializedMessageException
assertInitialized
in interface Message<T>
UninitializedMessageException
protected T checktInitialized() throws InvalidProtocolBufferException
InvalidProtocolBufferException
protected void loadAndClear()
protected void load()
public void writeUnframed(CodedOutputStream output) throws IOException
writeUnframed
in interface Message<T>
IOException
public void writeFramed(CodedOutputStream output) throws IOException
writeFramed
in interface Message<T>
IOException
public 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>
IOException
public void writeUnframed(OutputStream output) throws IOException
writeUnframed
in interface Message<T>
IOException
public int serializedSizeFramed()
serializedSizeFramed
in interface Message<T>
public T mergeFramed(CodedInputStream input) throws IOException
mergeFramed
in interface Message<T>
IOException
public T mergeUnframed(Buffer data) throws InvalidProtocolBufferException
mergeUnframed
in interface Message<T>
InvalidProtocolBufferException
public T mergeFramed(Buffer data) throws InvalidProtocolBufferException
mergeFramed
in interface Message<T>
InvalidProtocolBufferException
public T mergeUnframed(byte[] data) throws InvalidProtocolBufferException
mergeUnframed
in interface Message<T>
InvalidProtocolBufferException
public T mergeFramed(byte[] data) throws InvalidProtocolBufferException
mergeFramed
in interface Message<T>
InvalidProtocolBufferException
public T mergeUnframed(InputStream input) throws IOException
mergeUnframed
in interface Message<T>
IOException
public T mergeFramed(InputStream input) throws IOException
mergeFramed
in interface Message<T>
IOException
protected static <T> void addAll(Iterable<T> values, Collection<? super T> list)
protected static void writeGroup(CodedOutputStream output, int tag, BaseMessage message) throws IOException
IOException
protected static <T extends BaseMessage> T readGroup(CodedInputStream input, int tag, T group) throws IOException
IOException
protected static int computeGroupSize(int tag, BaseMessage message)
protected static void writeMessage(CodedOutputStream output, int tag, BaseMessage message) throws IOException
IOException
protected static int computeMessageSize(int tag, BaseMessage message)
public static int readRawVarint32(InputStream is) throws IOException
IOException
protected static byte readRawByte(InputStream is) throws IOException
IOException
Copyright © 2010–2021 FuseSource, Corp.. All rights reserved.