org.fusesource.hawtbuf.codec
Class ObjectCodec<T>

java.lang.Object
  extended by org.fusesource.hawtbuf.codec.VariableCodec<T>
      extended by 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
ObjectCodec()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectCodec

public ObjectCodec()
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


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.