org.jwall.web.audit.io
Class ConcurrentDirectoryReader
java.lang.Object
org.jwall.web.audit.io.ConcurrentDirectoryReader
- All Implemented Interfaces:
- Iterable<AuditEvent>, AuditEventReader
public class ConcurrentDirectoryReader
- extends Object
- implements AuditEventReader
This is a simple directory reader which recursively scans all files from a specified directory
and tries to parse audit-events from them.
- Author:
- Christian Bockermann <chris@jwall.org>
ConcurrentDirectoryReader
public ConcurrentDirectoryReader(File directory)
throws IOException
- Create a new directory reader, which reads files from the specified directory.
- Parameters:
directory -
- Throws:
IOException
atEOF
public boolean atEOF()
- Specified by:
atEOF in interface AuditEventReader
bytesAvailable
public long bytesAvailable()
- Specified by:
bytesAvailable in interface AuditEventReader
bytesRead
public long bytesRead()
- Specified by:
bytesRead in interface AuditEventReader
close
public void close()
throws IOException
- Specified by:
close in interface AuditEventReader
- Throws:
IOException
readNext
public AuditEvent readNext()
throws IOException,
ParseException
- Description copied from interface:
AuditEventReader
- This method tries to read the next event that is available.
- Specified by:
readNext in interface AuditEventReader
- Returns:
- The next audit-event from or
NULL if no event is available.
- Throws:
IOException
ParseException
iterator
public Iterator<AuditEvent> iterator()
- Specified by:
iterator in interface Iterable<AuditEvent>
Copyright © 2012 jwall.org. All Rights Reserved.