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 Details

    • ObjectCodec

      public ObjectCodec()
  • Method Details

    • encode

      public void encode(Object object, DataOutput dataOut) throws IOException
      Description copied from interface: Codec
      Write the payload of the object to the DataOutput stream.
      Parameters:
      object -
      dataOut -
      Throws:
      IOException
    • decode

      public T decode(DataInput dataIn) throws IOException
      Description copied from interface: Codec
      Read the payload of the object from the DataInput stream.
      Parameters:
      dataIn -
      Returns:
      unmarshalled object
      Throws:
      IOException
    • createIOException

      private static IOException createIOException(String message, Throwable cause)