Package org.apache.lucene.util.packed
Class DirectReader
- java.lang.Object
-
- org.apache.lucene.util.packed.DirectReader
-
public class DirectReader extends Object
Retrieves an instance previously written byDirectWriter
Example usage:
int bitsPerValue = 100; IndexInput in = dir.openInput("packed", IOContext.DEFAULT); LongValues values = DirectReader.getInstance(in.randomAccessSlice(start, end), bitsPerValue); for (int i = 0; i < numValues; i++) { long value = values.get(i); }
- See Also:
DirectWriter
-
-
Constructor Summary
Constructors Constructor Description DirectReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LongValues
getInstance(RandomAccessInput slice, int bitsPerValue)
Retrieves an instance from the specified slice written decodingbitsPerValue
for each valuestatic LongValues
getInstance(RandomAccessInput slice, int bitsPerValue, long offset)
Retrieves an instance from the specifiedoffset
of the given slice decodingbitsPerValue
for each value
-
-
-
Method Detail
-
getInstance
public static LongValues getInstance(RandomAccessInput slice, int bitsPerValue)
Retrieves an instance from the specified slice written decodingbitsPerValue
for each value
-
getInstance
public static LongValues getInstance(RandomAccessInput slice, int bitsPerValue, long offset)
Retrieves an instance from the specifiedoffset
of the given slice decodingbitsPerValue
for each value
-
-