org.jwall.web.audit.io
Class SequentialFileReader
java.lang.Object
org.jwall.web.audit.io.SequentialFileReader
- All Implemented Interfaces:
- LineReader
public class SequentialFileReader
- extends Object
- implements LineReader
SequentialFileReader
public SequentialFileReader(File file)
throws IOException
- Throws:
IOException
SequentialFileReader
public SequentialFileReader(File file,
long start,
boolean removeAfterRead)
throws IOException
- Throws:
IOException
getCurrentFile
public File getCurrentFile()
getCurrentOffset
public Long getCurrentOffset()
getOldFileHandler
public FileHandler getOldFileHandler()
- Returns:
- the oldFileHandler
setOldFileHandler
public void setOldFileHandler(FileHandler oldFileHandler)
- Parameters:
oldFileHandler - the oldFileHandler to set
matchesSequence
public boolean matchesSequence(File f)
hasNext
public boolean hasNext()
readLine
public String readLine()
- Read a line from the current file, if the file reveals a 'null' line AND there is
a similarly named file already existing, then switch over to the 'next' file and
start reading from that.
- Specified by:
readLine in interface LineReader
- Returns:
getSource
public String getSource()
- Specified by:
getSource in interface LineReader
skip
public void skip(Long bytes)
- Specified by:
skip in interface LineReader
bytesRead
public Long bytesRead()
- Specified by:
bytesRead in interface LineReader
close
public void close()
Copyright © 2012 jwall.org. All Rights Reserved.