|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jwall.web.audit.io.AbstractAuditEventReader
public abstract class AbstractAuditEventReader
This abstract class implements the basic methods of an AuditEventReader. Implementations of
the AuditEventReader interface may inherit this class to ease implementation. The only
method that needs to be implemented is the readNext() method, which parses an
audit event object from the underlying file/stream.
| Field Summary | |
|---|---|
static String |
DEFAULT_AUDIT_EVENT_FACTORY_CLASS
|
| Constructor Summary | |
|---|---|
AbstractAuditEventReader(InputStream in)
This constructor creates a new AbstractAuditEventReader by initializing the basic reader instance to read from the given stream. |
|
AbstractAuditEventReader(Reader in)
This constructor creates a new AbstractAuditEventReader by initializing the basic reader instance to read from the given stream. |
|
| Method Summary | |
|---|---|
boolean |
atEOF()
|
long |
bytesAvailable()
|
long |
bytesRead()
|
void |
close()
|
double |
getDataRead()
Returns the number of bytes that have been read. |
double |
getFileSize()
Returns the number of bytes that are available in the file. |
static int |
getSectionIndex(String line)
This method returns the index of the section, that the given line maps to. |
boolean |
hasNext()
Deprecated. |
abstract AuditEvent |
readNext()
This method tries to read the next event that is available. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Field Detail |
|---|
public static final String DEFAULT_AUDIT_EVENT_FACTORY_CLASS
| Constructor Detail |
|---|
public AbstractAuditEventReader(InputStream in)
public AbstractAuditEventReader(Reader in)
| Method Detail |
|---|
public static int getSectionIndex(String line)
line - A section boundary line.
public double getFileSize()
-1.0 if the reader is reading
from a stream.
public double getDataRead()
public abstract AuditEvent readNext()
throws IOException,
ParseException
AuditEventReader
readNext in interface AuditEventReaderNULL if no event is available.
IOException
ParseExceptionAuditEventReader.readNext()public boolean hasNext()
true, if there is another event pending.
public void close()
throws IOException
close in interface AuditEventReaderIOExceptionAuditEventReader.close()public long bytesRead()
bytesRead in interface AuditEventReaderAuditEventReader.bytesRead()public long bytesAvailable()
bytesAvailable in interface AuditEventReaderAuditEventReader.bytesAvailable()public boolean atEOF()
atEOF in interface AuditEventReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||