org.nuiton.util
Class ReverseFileReader
java.lang.Object
org.nuiton.util.ReverseFileReader
- All Implemented Interfaces:
- Closeable
public class ReverseFileReader
- extends Object
- implements Closeable
Reverse file reader.
Read file line by line for end of file to begin of file.
- Version:
- $ID: $
- Author:
- chatellier
filename
protected String filename
randomfile
protected RandomAccessFile randomfile
position
protected long position
ReverseFileReader
public ReverseFileReader(File file)
throws IOException
- Throws:
IOException
ReverseFileReader
public ReverseFileReader(String filename)
throws IOException
- Throws:
IOException
readLine
public String readLine()
throws IOException
- Read one line from the current position towards the beginning.
- Returns:
- the next line of text from this file, or null if end of file is
encountered before even one byte is read.
- Throws:
IOException - if any pb while reading line
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
Copyright © 2004-2012 CodeLutin. All Rights Reserved.