public class PBMessageUnframedCodec<T extends MessageBuffer> extends VariableCodec<T>
Implements the Codec interface for PBMessages type which encode/decodes unframed messages.
Constructor and Description |
---|
PBMessageUnframedCodec(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() |
getFixedSize
public PBMessageUnframedCodec(PBMessageFactory<?,? extends T> factory)
public T decode(DataInput dataIn) throws IOException
Codec
IOException
public void encode(T value, DataOutput dataOut) throws IOException
Codec
IOException
public 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–2021 FuseSource, Corp.. All rights reserved.