org.jwall.web.audit.io
Class SequentialFileReader

java.lang.Object
  extended by org.jwall.web.audit.io.SequentialFileReader
All Implemented Interfaces:
LineReader

public class SequentialFileReader
extends Object
implements LineReader


Constructor Summary
SequentialFileReader(File file)
           
SequentialFileReader(File file, long start, boolean removeAfterRead)
           
 
Method Summary
 Long bytesRead()
           
 void close()
           
 File getCurrentFile()
           
 Long getCurrentOffset()
           
 FileHandler getOldFileHandler()
           
 String getSource()
           
 boolean hasNext()
           
 boolean matchesSequence(File f)
           
 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.
 void setOldFileHandler(FileHandler oldFileHandler)
           
 void skip(Long bytes)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequentialFileReader

public SequentialFileReader(File file)
                     throws IOException
Throws:
IOException

SequentialFileReader

public SequentialFileReader(File file,
                            long start,
                            boolean removeAfterRead)
                     throws IOException
Throws:
IOException
Method Detail

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.