|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object log.LogInputStream
A stream that can be used to read and process log files.
The LogInputStream will take an InputStream
and try to interpret the data from that stream as
a log file. You can then obtain the LogEntries
in the order they were put into the log
by calling readEntry()
.
LogInputStreams
can be filtered in which case you will only see the LogEntries that are
accepted
by the filter
.
Field Summary | |
protected InputStream |
m_isSource
The input stream that backs this stream. |
protected LogEntryFilter |
m_lefFilter
The filter to be applied on the stream, if any. |
protected ObjectInputStream |
m_oisSource
The object input stream that is build on top of the input stream. |
Constructor Summary | |
LogInputStream(InputStream isSource)
Create a new LogInputStream. |
|
LogInputStream(InputStream isSource,
LogEntryFilter lef)
Create a new LogInputStream. |
Method Summary | |
void |
close()
Close the stream and all streams that it relies on. |
LogEntry |
readEntry()
Read the next log entry that is accepted by the filter from the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected InputStream m_isSource
protected ObjectInputStream m_oisSource
LogEntries
.
protected LogEntryFilter m_lefFilter
Constructor Detail |
public LogInputStream(InputStream isSource) throws IOException
isSource
- the InputStream that is the base for this stream.
IOException
- if an error occured or the stream is not a valid log file.public LogInputStream(InputStream isSource, LogEntryFilter lef) throws IOException
isSource
- the InputStream that is the base for this stream.lef
- the filter to be applied on the stream.
IOException
- if an error occured or the stream is not a valid log file.Method Detail |
public void close() throws IOException
IOException
- if there was an error on closing.public LogEntry readEntry() throws IOException, ClassNotFoundException
accepted
by the filter from the stream.
IOException
- if an IOException
occurred while reading from the underlying stream.
Especially, this may be an EOFException
if the end of the stream has been reached. This is
the only way to find out whether there are more entries in the stream.
ClassNotFoundException
- if the exception was thrown by the underlying stream.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |