public class PBMessageFramedCodec<T extends MessageBuffer> extends VariableCodec<T>
Implements the Codec interface for PBMessages type which encode/decodes framed messages.
| Constructor and Description |
|---|
PBMessageFramedCodec(PBMessageFactory<?,? extends T> factory) |
| Modifier and Type | Method and Description |
|---|---|
T |
decode(DataInput dataIn)
Read the payload of the object from the DataInput stream.
|
T |
deepCopy(T value) |
void |
encode(T value,
DataOutput dataOut)
Write the payload of the object to the DataOutput stream.
|
int |
estimatedSize(T value) |
boolean |
isDeepCopySupported() |
boolean |
isEstimatedSizeSupported() |
getFixedSizepublic PBMessageFramedCodec(PBMessageFactory<?,? extends T> factory)
public T decode(DataInput dataIn) throws IOException
CodecIOExceptionpublic void encode(T value, DataOutput dataOut) throws IOException
CodecIOExceptionpublic boolean isEstimatedSizeSupported()
isEstimatedSizeSupported in interface Codec<T extends MessageBuffer>isEstimatedSizeSupported in class VariableCodec<T extends MessageBuffer>Codec.estimatedSize(Object) operation is supported.public int estimatedSize(T value)
estimatedSize in interface Codec<T extends MessageBuffer>estimatedSize in class VariableCodec<T extends MessageBuffer>public boolean isDeepCopySupported()
isDeepCopySupported in interface Codec<T extends MessageBuffer>isDeepCopySupported in class VariableCodec<T extends MessageBuffer>Codec.deepCopy(Object) operations is supported.public T deepCopy(T value)
deepCopy in interface Codec<T extends MessageBuffer>deepCopy in class VariableCodec<T extends MessageBuffer>Copyright © 2010–2025 FuseSource, Corp.. All rights reserved.