Package org.terrier.structures
Class BaseCompressingMetaIndex.InputStream
- java.lang.Object
-
- org.terrier.structures.BaseCompressingMetaIndex.InputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.util.Iterator<java.lang.String[]>
- Direct Known Subclasses:
CompressingMetaIndex.InputStream
- Enclosing class:
- BaseCompressingMetaIndex
public abstract static class BaseCompressingMetaIndex.InputStream extends java.lang.Object implements java.util.Iterator<java.lang.String[]>, java.io.Closeable
An iterator for reading a MetaIndex as a stream
-
-
Field Summary
Fields Modifier and Type Field Description protected long
fileLength
protected int[]
keyByteOffset
protected int
keyCount
protected long
lastOffset
protected int
recordLength
protected int[]
valueByteLengths
-
Constructor Summary
Constructors Constructor Description InputStream(IndexOnDisk _index, java.lang.String structureName)
Constructs an instance of the class withInputStream(IndexOnDisk _index, java.lang.String _structureName, int _startingId, int _endId)
Constructs an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getIndex()
Return the position that we are at (entry number)boolean
hasNext()
java.lang.String[]
next()
void
remove()
-
-
-
Constructor Detail
-
InputStream
public InputStream(IndexOnDisk _index, java.lang.String _structureName, int _startingId, int _endId) throws java.io.IOException
Constructs an instance of the class with- Parameters:
_index
-_structureName
-_startingId
-_endId
-- Throws:
java.io.IOException
-
InputStream
public InputStream(IndexOnDisk _index, java.lang.String structureName) throws java.io.IOException
Constructs an instance of the class with- Parameters:
_index
-structureName
-- Throws:
java.io.IOException
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.String[]>
-
getIndex
public int getIndex()
Return the position that we are at (entry number)
-
next
public java.lang.String[] next()
- Specified by:
next
in interfacejava.util.Iterator<java.lang.String[]>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.lang.String[]>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-