org.jwall.web.audit.io
Class ModSecurityAuditReader

java.lang.Object
  extended by org.jwall.web.audit.io.AbstractAuditEventReader
      extended by org.jwall.web.audit.io.ModSecurityAuditReader
All Implemented Interfaces:
Iterable<AuditEvent>, AuditEventReader

public class ModSecurityAuditReader
extends AbstractAuditEventReader

This class implements a reader for AuditEvent-objects read from a file produced by mod_security prior version 2.0.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
 
Fields inherited from class org.jwall.web.audit.io.AbstractAuditEventReader
DEFAULT_AUDIT_EVENT_FACTORY_CLASS
 
Constructor Summary
ModSecurityAuditReader(File f)
          This creates a new instance of this class that reads events from the given file.
ModSecurityAuditReader(File f, boolean tail)
          This creates a new instance of this class that reads events from the given file.
ModSecurityAuditReader(InputStream in)
           
 
Method Summary
 Iterator<AuditEvent> iterator()
           
 AuditEvent readNext()
          This method reads another event from the stream.
 
Methods inherited from class org.jwall.web.audit.io.AbstractAuditEventReader
atEOF, bytesAvailable, bytesRead, close, getDataRead, getFileSize, getSectionIndex, hasNext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModSecurityAuditReader

public ModSecurityAuditReader(File f)
                       throws IOException
This creates a new instance of this class that reads events from the given file.

Parameters:
f -
Throws:
IOException

ModSecurityAuditReader

public ModSecurityAuditReader(InputStream in)

ModSecurityAuditReader

public ModSecurityAuditReader(File f,
                              boolean tail)
                       throws IOException
This creates a new instance of this class that reads events from the given file.

Parameters:
f -
Throws:
IOException
Method Detail

readNext

public AuditEvent readNext()
                    throws IOException,
                           ParseException
This method reads another event from the stream.

Specified by:
readNext in interface AuditEventReader
Specified by:
readNext in class AbstractAuditEventReader
Returns:
The event that was read.
Throws:
IOException
ParseException
See Also:
AuditEventReader.readNext()

iterator

public Iterator<AuditEvent> iterator()


Copyright © 2012 jwall.org. All Rights Reserved.