Package org.fusesource.hawtbuf.codec
Class ObjectCodec<T>
- java.lang.Object
-
- org.fusesource.hawtbuf.codec.VariableCodec<T>
-
- org.fusesource.hawtbuf.codec.ObjectCodec<T>
-
- All Implemented Interfaces:
Codec<T>
public class ObjectCodec<T> extends VariableCodec<T>
Implementation of a Marshaller for Objects
-
-
Constructor Summary
Constructors Constructor Description ObjectCodec()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.io.IOException
createIOException(java.lang.String message, java.lang.Throwable cause)
T
decode(java.io.DataInput dataIn)
Read the payload of the object from the DataInput stream.void
encode(java.lang.Object object, java.io.DataOutput dataOut)
Write the payload of the object to the DataOutput stream.-
Methods inherited from class org.fusesource.hawtbuf.codec.VariableCodec
deepCopy, estimatedSize, getFixedSize, isDeepCopySupported, isEstimatedSizeSupported
-
-
-
-
Method Detail
-
encode
public void encode(java.lang.Object object, java.io.DataOutput dataOut) throws java.io.IOException
Description copied from interface:Codec
Write the payload of the object to the DataOutput stream.- Throws:
java.io.IOException
-
decode
public T decode(java.io.DataInput dataIn) throws java.io.IOException
Description copied from interface:Codec
Read the payload of the object from the DataInput stream.- Returns:
- unmarshalled object
- Throws:
java.io.IOException
-
createIOException
private static java.io.IOException createIOException(java.lang.String message, java.lang.Throwable cause)
-
-