T - entry type.public class CheckpointFile<T> extends Object
CheckpointFile.EntryFormatter is used
to convert the entry into a string and vice versa.| Modifier and Type | Class and Description |
|---|---|
static class |
CheckpointFile.CheckpointReadBuffer<T> |
static interface |
CheckpointFile.EntryFormatter<T>
This is used to convert the given entry of type
T into a string and vice versa. |
| Constructor and Description |
|---|
CheckpointFile(File file,
int version,
CheckpointFile.EntryFormatter<T> formatter) |
| Modifier and Type | Method and Description |
|---|---|
List<T> |
read() |
void |
write(Collection<T> entries) |
byte[] |
writeToByteArray(Collection<T> entries) |
void |
writeToWriter(Collection<T> entries,
BufferedWriter writer) |
public CheckpointFile(File file, int version, CheckpointFile.EntryFormatter<T> formatter) throws IOException
IOExceptionpublic void write(Collection<T> entries) throws IOException
IOExceptionpublic byte[] writeToByteArray(Collection<T> entries) throws IOException
IOExceptionpublic void writeToWriter(Collection<T> entries, BufferedWriter writer) throws IOException
IOExceptionpublic List<T> read() throws IOException
IOException