public class AccessLogAuditReader extends AbstractAuditEventReader
bytesRead, counter, DEFAULT_AUDIT_EVENT_FACTORY_CLASS, eofReached, eventFactory, fileSize, inputFile, pending, reader| Constructor and Description |
|---|
AccessLogAuditReader(File accessLogFile)
This creates an instance of this class that reads from the
given file
accessLogFile. |
AccessLogAuditReader(File accessLogFile,
boolean tail)
This creates an instance of this class that reads from the
given file
accessLogFile. |
AccessLogAuditReader(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
static AuditEvent |
createEvent(String accessLine)
This method create an audit-event from the given access-line.
|
Iterator<AuditEvent> |
iterator() |
AuditEvent |
readNext()
This method reads the next line from the underlying file
and creates an AuditEvent-object from it.
|
static String[] |
splitAccessLine(String input)
This method splits the given line into tokens.
|
atEOF, bytesAvailable, bytesRead, close, getDataRead, getFileSize, getSectionIndex, hasNextpublic AccessLogAuditReader(File accessLogFile, boolean tail) throws IOException
accessLogFile.accessLogFile - The file to read events from.IOException - In case a reader on this file cannot be created.public AccessLogAuditReader(File accessLogFile) throws IOException
accessLogFile.accessLogFile - The file to read events from.IOException - In case a reader on this file cannot be created.public AccessLogAuditReader(InputStream in)
public AuditEvent readNext()
readNext in interface AuditEventReaderreadNext in class AbstractAuditEventReaderNULL if no event is available.AuditEventReader.readNext()public static String[] splitAccessLine(String input)
input - The string to be split into parts.public static AuditEvent createEvent(String accessLine) throws Exception
accessLine - The line to create the event from.Exception - In case anything goes wrong ;-)public Iterator<AuditEvent> iterator()
Copyright © 2014 jwall.org. All Rights Reserved.