Package org.apache.lucene.util.packed
Class PackedInts.Writer
java.lang.Object
org.apache.lucene.util.packed.PackedInts.Writer
- Enclosing class:
- PackedInts
A write-once Writer.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected final DataOutput
protected final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
add
(long v) Add a value to the stream.final int
The number of bits per value.abstract void
finish()
Perform end-of-stream operations.protected abstract PackedInts.Format
The format used to serialize values.abstract int
ord()
Returns the current ord in the stream (number of values that have been written so far minus one).
-
Field Details
-
out
-
valueCount
protected final int valueCount -
bitsPerValue
protected final int bitsPerValue
-
-
Constructor Details
-
Writer
-
-
Method Details
-
getFormat
The format used to serialize values. -
add
Add a value to the stream.- Throws:
IOException
-
bitsPerValue
public final int bitsPerValue()The number of bits per value. -
finish
Perform end-of-stream operations.- Throws:
IOException
-
ord
public abstract int ord()Returns the current ord in the stream (number of values that have been written so far minus one).
-