org.apache.lucene.util.packed
Class BlockPackedReader

java.lang.Object
  extended by org.apache.lucene.util.packed.BlockPackedReader

public final class BlockPackedReader
extends Object

Reader for sequences of longs written with BlockPackedWriter.

See Also:
BlockPackedWriter
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
BlockPackedReader(DataInput in, int packedIntsVersion, int blockSize, long valueCount)
          Sole constructor.
 
Method Summary
 long next()
          Read the next value.
 LongsRef next(int count)
          Read between 1 and count values.
 long ord()
          Return the offset of the next value to read.
 void skip(long count)
          Skip exactly count values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockPackedReader

public BlockPackedReader(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 Detail

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.



Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.