public class BinaryRateUpdater extends Object implements AutoCloseable
| Constructor and Description |
|---|
BinaryRateUpdater(File reportFile)
Constructor
|
BinaryRateUpdater(File reportFile,
boolean overlay)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flushes the data to disk
|
FileHeader |
getFileHeader()
Gets the file header
|
static void |
joinFile(BinaryRateUpdater binaryRateUpdater,
File reportFile1)
Join a file another file on an previously opened updater
|
void |
update(RateEntry newer,
long index) |
void |
updateHeader(FileHeader header)
Updates the file header
|
public BinaryRateUpdater(File reportFile) throws IOException
reportFile - the rate report file nameIOException - in case of I/O errorspublic BinaryRateUpdater(File reportFile, boolean overlay) throws IOException
reportFile - the rate report file nameoverlay - whether the update should overlay previous files. If false,
the updater will create data files from the joined ones if
the report file is not existentIOException - in case of I/O errorspublic FileHeader getFileHeader()
public void updateHeader(FileHeader header) throws IOException
header - the file headerIOException - for multiple I/O related errorspublic void update(RateEntry newer, long index) throws IOException
IOExceptionpublic void flush()
throws IOException
IOException - in case of I/O errorspublic void close()
close in interface AutoCloseablepublic static void joinFile(BinaryRateUpdater binaryRateUpdater, File reportFile1) throws IOException
binaryRateUpdater - the updater instance to join the file toreportFile1 - the file to be joinedIOException - for multiple I/O related errorsThis documentation was released into the public domain.