Package org.apache.lucene.util.packed
Class PackedDataOutput
- java.lang.Object
-
- org.apache.lucene.util.packed.PackedDataOutput
-
public final class PackedDataOutput extends java.lang.ObjectADataOutputwrapper to write unaligned, variable-length packed integers.- See Also:
PackedDataInput
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longcurrent(package private) DataOutputout(package private) intremainingBits
-
Constructor Summary
Constructors Constructor Description PackedDataOutput(DataOutput out)Create a new instance that wrapsout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Flush pending bits to the underlyingDataOutput.voidwriteLong(long value, int bitsPerValue)Write a value using exactlybitsPerValuebits.
-
-
-
Field Detail
-
out
final DataOutput out
-
current
long current
-
remainingBits
int remainingBits
-
-
Constructor Detail
-
PackedDataOutput
public PackedDataOutput(DataOutput out)
Create a new instance that wrapsout.
-
-
Method Detail
-
writeLong
public void writeLong(long value, int bitsPerValue) throws java.io.IOExceptionWrite a value using exactlybitsPerValuebits.- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOExceptionFlush pending bits to the underlyingDataOutput.- Throws:
java.io.IOException
-
-