java.lang.Object
org.apache.lucene.util.packed.BlockPackedReaderIterator
Reader for sequences of longs written with
BlockPackedWriter
.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockPackedReaderIterator
(DataInput in, int packedIntsVersion, int blockSize, long valueCount) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionlong
next()
Read the next value.next
(int count) Read between1
andcount
values.long
ord()
Return the offset of the next value to read.(package private) static long
private void
refill()
void
Reset the current reader to wrap a stream ofvalueCount
values contained inin
.void
skip
(long count) Skip exactlycount
values.private void
skipBytes
(long count)
-
Field Details
-
in
DataInput in -
packedIntsVersion
final int packedIntsVersion -
valueCount
long valueCount -
blockSize
final int blockSize -
values
final long[] values -
valuesRef
-
blocks
byte[] blocks -
off
int off -
ord
long ord
-
-
Constructor Details
-
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 theBlockPackedWriter
which has been used to write the stream
-
-
Method Details
-
readVLong
- Throws:
IOException
-
reset
Reset the current reader to wrap a stream ofvalueCount
values contained inin
. The block size remains unchanged. -
skip
Skip exactlycount
values.- Throws:
IOException
-
skipBytes
- Throws:
IOException
-
next
Read the next value.- Throws:
IOException
-
next
Read between1
andcount
values.- Throws:
IOException
-
refill
- Throws:
IOException
-
ord
public long ord()Return the offset of the next value to read.
-