org.egothor.dockyard
Class StreamReader

java.lang.Object
  extended by org.egothor.dockyard.StreamReader
All Implemented Interfaces:
BarrelReader

public class StreamReader
extends java.lang.Object
implements BarrelReader

StreamReader.java

Author:
galambos

Constructor Summary
StreamReader(DataInput in)
           
 
Method Summary
 void close()
          Close this BarrelReader.
 SequenceWithClose<DocumentData> getDocuments()
          Returns an enumeration of all active documents.
 SequenceWithClose<IListReader> getILists()
          Returns an enumeration of all inverted lists.
 long length()
          Returns number of active documents in this Barrel.
 void rewind()
          Restart this BarrelReader so that the documents can be read again.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamReader

public StreamReader(DataInput in)
             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

length

public long length()
Description copied from interface: BarrelReader
Returns number of active documents in this Barrel.

Specified by:
length in interface BarrelReader
Returns:
the number of active documents

rewind

public void rewind()
            throws java.io.IOException
Restart this BarrelReader so that the documents can be read again.

Specified by:
rewind in interface BarrelReader
Throws:
java.io.IOException

getILists

public SequenceWithClose<IListReader> getILists()
Description copied from interface: BarrelReader
Returns an enumeration of all inverted lists. The objects of the enumeration are IListReaders. The readers must be initialized and the reader can represent a free list, that is, an IListReader that has no items can be returned.

Specified by:
getILists in interface BarrelReader
Returns:
an Enumeration of IListReader objects

getDocuments

public SequenceWithClose<DocumentData> getDocuments()
Description copied from interface: BarrelReader
Returns an enumeration of all active documents. The objects of the enumeration are DocumentDatas. If the enumeration contains no elements, then the Barrel was destroyed completely.

Specified by:
getDocuments in interface BarrelReader
Returns:
an Enumeration of DocMDocumentDataects

close

public void close()
Description copied from interface: BarrelReader
Close this BarrelReader.

Specified by:
close in interface BarrelReader