Interface ExternalSort.Serializer<T>

  • Type Parameters:
    T - the type of element to be sorted
    Enclosing class:
    ExternalSort<T>

    public static interface ExternalSort.Serializer<T>
    Specifies how to serialize the elements to disk and read them back in again.
    • Method Detail

      • write

        void write​(GeneiousObjectOutputStream out,
                   T element)
            throws java.io.IOException
        writes this element to a stream
        Parameters:
        out - the stream to write to
        element - the element to write to the stream
        Throws:
        java.io.IOException - if there is a problem writing to the stream
      • read

        T read​(GeneiousObjectInputStream in)
        throws java.io.IOException
        reads an element from a stream
        Parameters:
        in - the stream to read from
        Returns:
        the newly read element
        Throws:
        java.io.IOException - if there is a problem reading from the stream