public class SequentialFileReader extends Object implements LineReader
| Constructor and Description |
|---|
SequentialFileReader(File file) |
SequentialFileReader(File file,
long start,
boolean removeAfterRead) |
| Modifier and Type | Method and Description |
|---|---|
Long |
bytesRead() |
void |
close() |
File |
getCurrentFile() |
Long |
getCurrentOffset() |
FileHandler |
getOldFileHandler() |
String |
getSource() |
boolean |
hasNext() |
boolean |
matchesSequence(File f) |
protected void |
openNextFile() |
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) |
public SequentialFileReader(File file) throws IOException
IOExceptionpublic SequentialFileReader(File file, long start, boolean removeAfterRead) throws IOException
IOExceptionpublic File getCurrentFile()
public Long getCurrentOffset()
public FileHandler getOldFileHandler()
public void setOldFileHandler(FileHandler oldFileHandler)
oldFileHandler - the oldFileHandler to setpublic boolean matchesSequence(File f)
public boolean hasNext()
protected void openNextFile()
throws IOException
IOExceptionpublic String readLine()
readLine in interface LineReaderpublic String getSource()
getSource in interface LineReaderpublic void skip(Long bytes)
skip in interface LineReaderpublic Long bytesRead()
bytesRead in interface LineReaderpublic void close()
Copyright © 2014 jwall.org. All Rights Reserved.