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(DataInput dataIn)
Read the payload of the object from the DataInput stream.
|
T |
deepCopy(T source) |
void |
encode(T value,
DataOutput dataOut)
Write the payload of the object to the DataOutput stream.
|
int |
estimatedSize(T object) |
boolean |
isDeepCopySupported() |
boolean |
isEstimatedSizeSupported() |
getFixedSize
public void encode(T value, DataOutput dataOut) throws IOException
Codec
IOException
public T decode(DataInput dataIn) throws IOException
Codec
IOException
protected 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–2021 FuseSource, Corp.. All rights reserved.