org.archive.wayback.util.flatfile
Class ReverseBufferedReader

java.lang.Object
  extended by org.archive.wayback.util.flatfile.ReverseBufferedReader

public class ReverseBufferedReader
extends java.lang.Object

Just like a BufferedReader, except the buffer scrolls backvards, allowing this one to support 'readPrevLine()' instead of readLine().

Version:
$Date: 2006-10-17 14:56:32 -0700 (Tue, 17 Oct 2006) $, $Revision: 1262 $
Author:
brad

Constructor Summary
ReverseBufferedReader(java.io.RandomAccessFile raf)
           
 
Method Summary
 void close()
           
 java.lang.String readPrevLine()
           
 void setBufferSize(int bufferSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReverseBufferedReader

public ReverseBufferedReader(java.io.RandomAccessFile raf)
                      throws java.io.IOException
Parameters:
raf -
Throws:
java.io.IOException
Method Detail

setBufferSize

public void setBufferSize(int bufferSize)
Parameters:
bufferSize - The bufferSize to set.

readPrevLine

public java.lang.String readPrevLine()
                              throws java.io.IOException
Returns:
String previous line read from the file
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2005-2009 Internet Archive. All Rights Reserved.