Package org.apache.camel.component.wal
Class LogReader
java.lang.Object
org.apache.camel.component.wal.LogReader
- All Implemented Interfaces:
AutoCloseable
A reader for write-ahead log files
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY- See Also:
-
-
Constructor Details
-
LogReader
Constructor- Parameters:
logFile- the report file name- Throws:
IOException- in case of I/O errors
-
LogReader
Constructor- Parameters:
logFile- the report file name- Throws:
IOException- in case of I/O errors
-
-
Method Details
-
getHeader
Gets the file header- Returns:
- the file header
-
readEntry
Read an entry from the file.- Returns:
- A log entry from the file or null when reaching the end-of-file or if the file is empty
- Throws:
IOException- if unable to read the entry
-
close
public void close()Close the reader and release resources- Specified by:
closein interfaceAutoCloseable
-