|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.kernel.log.impl.LogFileParser
public class LogFileParser
This class parses log files into LogEvents
| Constructor Summary | |
|---|---|
LogFileParser(File aFile)
Create a new LogFileParser. |
|
| Method Summary | |
|---|---|
int |
readBinary(long startPos,
byte[] buffer)
Reads from a start position a given number of bytes from the log file. |
long |
readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ArrayList events)
Parses the log entity for log events. |
long |
readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ObjectOutputStream target)
|
long |
size()
Returns the size of the log entity in bytes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogFileParser(File aFile)
| Method Detail |
|---|
public long size()
throws IOException
size in interface LogEntityReaderIOException - Thrown if file does not exist or cannot be read
UnsupportedOperationException - if the entity size is not
supported on the currently used log entity
public long readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ArrayList events)
throws IOException
LogEntityReader
events log events. If the start position is >0 the parser seeks
to next starting log event.
If the file position is a positive number the reading starts from the given file position. If the given file position is a negative number it is used as offset from the end of the file.
Be prepared that the requested number of events can be limited.
The parser returns if either the end of the file is reached, the max number of events is parsed or the max processing time is exceeded.
readLogEvents in interface LogEntityReaderstartPos - The start position where the parsing startsmaxEvents - The max number of events to be processedmaxProcessingTime - The max processing time in milliseconds.
A value of 0 means no time limit.filter - A log event filterevents - The event list to be filled with the parsed
IOException - Thrown if file does not exist or cannot be read
public long readLogEvents(long startPos,
int maxEvents,
long maxProcessingTime,
LogEventFilter filter,
ObjectOutputStream target)
throws IOException
readLogEvents in interface LogEntityReaderIOException
public int readBinary(long startPos,
byte[] buffer)
throws IOException
readBinary in interface LogEntityReaderstartPos - The start position where the parsing startsbuffer - The allocated buffer to receive the file data
IOException - Thrown if file does not exist or cannot be read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||