public abstract class AbstractBufferCodec<T extends Buffer> extends VariableCodec<T>
| Constructor and Description |
|---|
AbstractBufferCodec() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
createBuffer(byte[] data) |
T |
decode(java.io.DataInput dataIn)
Read the payload of the object from the DataInput stream.
|
T |
deepCopy(T source) |
void |
encode(T value,
java.io.DataOutput dataOut)
Write the payload of the object to the DataOutput stream.
|
int |
estimatedSize(T object) |
boolean |
isDeepCopySupported() |
boolean |
isEstimatedSizeSupported() |
getFixedSizepublic void encode(T value, java.io.DataOutput dataOut) throws java.io.IOException
Codecjava.io.IOExceptionpublic T decode(java.io.DataInput dataIn) throws java.io.IOException
Codecjava.io.IOExceptionprotected abstract T createBuffer(byte[] data)
public boolean isDeepCopySupported()
isDeepCopySupported in interface Codec<T extends Buffer>isDeepCopySupported in class VariableCodec<T extends Buffer>Codec.deepCopy(Object) operations is supported.public boolean isEstimatedSizeSupported()
isEstimatedSizeSupported in interface Codec<T extends Buffer>isEstimatedSizeSupported in class VariableCodec<T extends Buffer>Codec.estimatedSize(Object) operation is supported.public int estimatedSize(T object)
estimatedSize in interface Codec<T extends Buffer>estimatedSize in class VariableCodec<T extends Buffer>Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.