org.egothor.robot.index
Class DocumentsFastReader

java.lang.Object
  extended by org.egothor.robot.index.DocumentsFastReader
All Implemented Interfaces:
Sequence<DocumentData>, SequenceWithClose<DocumentData>

public class DocumentsFastReader
extends java.lang.Object
implements SequenceWithClose<DocumentData>

DocumentsFastReader.java Created on August 15, 2005, 2:23 AM

Author:
galambos

Constructor Summary
DocumentsFastReader(java.lang.String location, long length)
          Constructor for the DocumentsFastReader object.
 
Method Summary
 void close()
          Close the reader's data stream.
 DocumentData next()
          Return the next element.
 void rewind()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentsFastReader

public DocumentsFastReader(java.lang.String location,
                           long length)
                    throws java.io.IOException
Constructor for the DocumentsFastReader object.

Parameters:
location - the directory where this object will read
map - used to store information regarding removed elements
Throws:
java.io.IOException - if an I/O error occurs
Method Detail

rewind

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

close

public void close()
Close the reader's data stream. The reference to the map of removed elements is set to null so the garbage collector can do its job.

Specified by:
close in interface SequenceWithClose<DocumentData>

next

public DocumentData next()
Return the next element.

Specified by:
next in interface Sequence<DocumentData>
Returns:
the next element