Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass.hadoop
Class SimpleDocumentIndexInputStream

java.lang.Object
  extended by uk.ac.gla.terrier.structures.DocumentIndexInputStream
      extended by uk.ac.gla.terrier.structures.indexing.singlepass.hadoop.SimpleDocumentIndexInputStream
All Implemented Interfaces:
IndexConfigurable

public class SimpleDocumentIndexInputStream
extends DocumentIndexInputStream

InputStream for a simple DocumentIndex. Only contains Docno and length of document

Since:
2.2
Version:
$Revision: 1.2 $
Author:
Richard McCreadie and Craig Macdonald

Constructor Summary
SimpleDocumentIndexInputStream(java.lang.String path, java.lang.String prefix)
          A constructor of a document index input stream from an index path and prefix.
 
Method Summary
 int readNextEntry()
          Reads the next entry from the stream.
 
Methods inherited from class uk.ac.gla.terrier.structures.DocumentIndexInputStream
close, getDocumentId, getDocumentLength, getDocumentNumber, getEndBitOffset, getEndOffset, getStartBitOffset, getStartOffset, print, setDocnoEntryLength, setIndex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDocumentIndexInputStream

public SimpleDocumentIndexInputStream(java.lang.String path,
                                      java.lang.String prefix)
A constructor of a document index input stream from an index path and prefix.

Parameters:
path - String path to the index
prefix - String prefix of the filenames of the index
Method Detail

readNextEntry

public int readNextEntry()
                  throws java.io.IOException
Description copied from class: DocumentIndexInputStream
Reads the next entry from the stream.

Overrides:
readNextEntry in class DocumentIndexInputStream
Returns:
the number of bytes read from the stream, or -1 if EOF has been reached.
Throws:
java.io.IOException - if an I/O error occurs.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow