|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jwall.web.audit.io.ModSecurity2AuditReader
public class ModSecurity2AuditReader
This class implements a parser for audit-logfile for the modsecurity2. It
also implements the AuditEventSource interface.
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
| Constructor Summary | |
|---|---|
ModSecurity2AuditReader(java.io.File file)
|
|
ModSecurity2AuditReader(java.io.File file,
boolean tail)
This constructor creates a ModSecurity2-AuditReader with a file as source. |
|
ModSecurity2AuditReader(java.io.InputStream in,
boolean tail)
This constructor creates an audit-event-Reader that reads from the given inputstream. |
|
| Method Summary | |
|---|---|
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(java.lang.String line)
|
boolean |
hasNext()
|
AuditEvent |
readNext()
This method tries to read the next event that is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEBUG
| Constructor Detail |
|---|
public ModSecurity2AuditReader(java.io.InputStream in,
boolean tail)
throws java.io.IOException,
java.lang.Exception
in -
java.io.IOException
java.lang.Exception
public ModSecurity2AuditReader(java.io.File file,
boolean tail)
throws java.io.IOException,
java.lang.Exception
file - The file to read from.tail - Skip the whole file at first and read only events that
are subsequently appended.
java.io.IOException
java.lang.Exception
public ModSecurity2AuditReader(java.io.File file)
throws java.io.IOException,
java.lang.Exception
java.io.IOException
java.lang.Exception| Method Detail |
|---|
public double getFileSize()
-1.0 if the reader is reading
from a stream.
public double getDataRead()
public AuditEvent readNext()
throws java.io.IOException,
ParseException
AuditEventReader
readNext in interface AuditEventReaderNULL if no event is available.
java.io.IOException
ParseExceptionAuditEventReader.readNext()public static int getSectionIndex(java.lang.String line)
public boolean hasNext()
public void close()
throws java.io.IOException
close in interface AuditEventReaderjava.io.IOExceptionpublic long bytesRead()
bytesRead in interface AuditEventReaderpublic long bytesAvailable()
bytesAvailable in interface AuditEventReader
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||