Class BlockPackedReaderIterator

java.lang.Object
org.apache.lucene.util.packed.BlockPackedReaderIterator

public final class BlockPackedReaderIterator extends Object
Reader for sequences of longs written with BlockPackedWriter.
See Also:
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
  • 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 the BlockPackedWriter which has been used to write the stream
  • Method Details

    • reset

      public void reset(DataInput in, long valueCount)
      Reset the current reader to wrap a stream of valueCount values contained in in. The block size remains unchanged.
    • skip

      public void skip(long count) throws IOException
      Skip exactly count values.
      Throws:
      IOException
    • next

      public long next() throws IOException
      Read the next value.
      Throws:
      IOException
    • next

      public LongsRef next(int count) throws IOException
      Read between 1 and count values.
      Throws:
      IOException
    • ord

      public long ord()
      Return the offset of the next value to read.