Package org.apache.lucene.util.packed
Class PackedDataInput
- java.lang.Object
-
- org.apache.lucene.util.packed.PackedDataInput
-
public final class PackedDataInput extends java.lang.ObjectADataInputwrapper to read unaligned, variable-length packed integers. This API is much slower than thePackedIntsfixed-length API but can be convenient to save space.- See Also:
PackedDataOutput
-
-
Constructor Summary
Constructors Constructor Description PackedDataInput(DataInput in)Create a new instance that wrapsin.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longreadLong(int bitsPerValue)Read the next long using exactlybitsPerValuebits.voidskipToNextByte()If there are pending bits (at most 7), they will be ignored and the next value will be read starting at the next byte.
-
-
-
Constructor Detail
-
PackedDataInput
public PackedDataInput(DataInput in)
Create a new instance that wrapsin.
-
-
Method Detail
-
readLong
public long readLong(int bitsPerValue) throws java.io.IOExceptionRead the next long using exactlybitsPerValuebits.- Throws:
java.io.IOException
-
skipToNextByte
public void skipToNextByte()
If there are pending bits (at most 7), they will be ignored and the next value will be read starting at the next byte.
-
-