Class FunctionalSerializer<T,​V>

  • Type Parameters:
    T - the target type
    V - the mapped type
    All Implemented Interfaces:
    Serializer<T>

    public class FunctionalSerializer<T,​V>
    extends Object
    implements Serializer<T>
    A serializer that delegates to the serializer of a mapped value.
    Author:
    Paul Ferraro
    • Method Detail

      • write

        public void write​(DataOutput output,
                          T value)
                   throws IOException
        Description copied from interface: Serializer
        Writes the specified object to the specified output stream
        Specified by:
        write in interface Serializer<T>
        Parameters:
        output - the data output stream
        value - an object to serialize
        Throws:
        IOException - if an I/O error occurs
      • read

        public T read​(DataInput input)
               throws IOException
        Description copied from interface: Serializer
        Reads an object from the specified input stream.
        Specified by:
        read in interface Serializer<T>
        Parameters:
        input - a data input stream
        Returns:
        the deserialized object
        Throws:
        IOException - if an I/O error occurs