Class ObjectCodec<T>

  • All Implemented Interfaces:
    Codec<T>

    public class ObjectCodec<T>
    extends VariableCodec<T>
    Implementation of a Marshaller for Objects
    • 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
      • createIOException

        private static java.io.IOException createIOException​(java.lang.String message,
                                                             java.lang.Throwable cause)