org.terrier.structures
Class CompressingMetaIndex.InputStream

java.lang.Object
  extended by org.terrier.structures.CompressingMetaIndex.InputStream
All Implemented Interfaces:
Closeable, Iterator<String[]>
Enclosing class:
CompressingMetaIndex

public static class CompressingMetaIndex.InputStream
extends Object
implements Iterator<String[]>, Closeable

An iterator for reading a MetaIndex as a stream


Field Summary
protected  int compressionLevel
           
protected  long fileLength
           
protected  Inflater inflater
           
protected  int[] keyByteOffset
           
protected  int keyCount
           
protected  long lastOffset
           
protected  int recordLength
           
protected  int[] valueByteLengths
           
 
Constructor Summary
CompressingMetaIndex.InputStream(Index _index, String structureName)
          Constructs an instance of the class with
CompressingMetaIndex.InputStream(Index _index, String _structureName, int _startingId, int _endId)
          Constructs an instance of the class with
 
Method Summary
 void close()
          
 int getIndex()
          Return the position that we are at (entry number)
 boolean hasNext()
          
 String[] next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compressionLevel

protected final int compressionLevel

recordLength

protected final int recordLength

inflater

protected Inflater inflater

keyCount

protected int keyCount

keyByteOffset

protected int[] keyByteOffset

valueByteLengths

protected int[] valueByteLengths

lastOffset

protected long lastOffset

fileLength

protected long fileLength
Constructor Detail

CompressingMetaIndex.InputStream

public CompressingMetaIndex.InputStream(Index _index,
                                        String _structureName,
                                        int _startingId,
                                        int _endId)
                                 throws IOException
Constructs an instance of the class with

Parameters:
_index -
_structureName -
_startingId -
_endId -
Throws:
IOException

CompressingMetaIndex.InputStream

public CompressingMetaIndex.InputStream(Index _index,
                                        String structureName)
                                 throws IOException
Constructs an instance of the class with

Parameters:
_index -
structureName -
Throws:
IOException
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<String[]>

getIndex

public int getIndex()
Return the position that we are at (entry number)


next

public String[] next()

Specified by:
next in interface Iterator<String[]>

remove

public void remove()

Specified by:
remove in interface Iterator<String[]>

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Throws:
IOException


Terrier 3.6. Copyright © 2004-2011 University of Glasgow