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 Details

    • write

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

      reads an element from a stream
      Parameters:
      in - the stream to read from
      Returns:
      the newly read element
      Throws:
      IOException - if there is a problem reading from the stream