Package org.apache.lucene.util.packed
Class BlockPackedReaderIterator
- java.lang.Object
-
- org.apache.lucene.util.packed.BlockPackedReaderIterator
-
public final class BlockPackedReaderIterator extends Object
Reader for sequences of longs written withBlockPackedWriter.- See Also:
BlockPackedWriter- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount)Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longnext()Read the next value.LongsRefnext(int count)Read between1andcountvalues.longord()Return the offset of the next value to read.voidreset(DataInput in, long valueCount)Reset the current reader to wrap a stream ofvalueCountvalues contained inin.voidskip(long count)Skip exactlycountvalues.
-
-
-
Constructor Detail
-
BlockPackedReaderIterator
public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount)
Sole constructor.- Parameters:
blockSize- the number of values of a block, must be equal to the block size of theBlockPackedWriterwhich has been used to write the stream
-
-
Method Detail
-
reset
public void reset(DataInput in, long valueCount)
Reset the current reader to wrap a stream ofvalueCountvalues contained inin. The block size remains unchanged.
-
skip
public void skip(long count) throws IOExceptionSkip exactlycountvalues.- Throws:
IOException
-
next
public long next() throws IOExceptionRead the next value.- Throws:
IOException
-
next
public LongsRef next(int count) throws IOException
Read between1andcountvalues.- Throws:
IOException
-
ord
public long ord()
Return the offset of the next value to read.
-
-