public class BinaryEventsReader extends java.lang.Object implements ExternalEventsReader
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BINARY_EXT
Extension of binary external events file
|
| Constructor and Description |
|---|
BinaryEventsReader(java.io.File eventsFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the input file streams of the reader.
|
static boolean |
isBinaryEeFile(java.io.File file)
Checks if the given file is a binary external events file
|
java.util.List<ExternalEvent> |
readEvents(int nrof)
Read events from a binary file created with storeBinaryFile method
|
static void |
storeToBinaryFile(java.lang.String fileName,
java.util.List<ExternalEvent> events)
Stores the events to a binary file
|
public static final java.lang.String BINARY_EXT
public BinaryEventsReader(java.io.File eventsFile)
eventsFile - The file where the events are readpublic java.util.List<ExternalEvent> readEvents(int nrof)
readEvents in interface ExternalEventsReadernrof - Maximum number of events to readstoreToBinaryFile(String, List)public static boolean isBinaryEeFile(java.io.File file)
file - The file to checkpublic static void storeToBinaryFile(java.lang.String fileName,
java.util.List<ExternalEvent> events)
throws java.io.IOException
fileName - Path to the file where the events are storedevents - List of events to storejava.io.IOException - if something in storing went wrongpublic void close()
ExternalEventsReaderclose in interface ExternalEventsReader