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 Summary
Modifier and TypeMethodDescriptionreads an element from a streamvoidwrite(GeneiousObjectOutputStream out, T element) writes this element to a stream
-
Method Details
-
write
writes this element to a stream- Parameters:
out- the stream to write toelement- 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
-