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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
read(GeneiousObjectInputStream in)
reads an element from a streamvoid
write(GeneiousObjectOutputStream out, T element)
writes this element to a stream
-
-
-
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 toelement
- 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
-
-