Package org.apache.lucene.util.packed
Class PackedWriter
- java.lang.Object
-
- org.apache.lucene.util.packed.PackedInts.Writer
-
- org.apache.lucene.util.packed.PackedWriter
-
final class PackedWriter extends PackedInts.Writer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) BulkOperation
encoder
(package private) boolean
finished
(package private) PackedInts.Format
format
(package private) int
iterations
(package private) byte[]
nextBlocks
(package private) long[]
nextValues
(package private) int
off
(package private) int
written
-
Fields inherited from class org.apache.lucene.util.packed.PackedInts.Writer
bitsPerValue, out, valueCount
-
-
Constructor Summary
Constructors Constructor Description PackedWriter(PackedInts.Format format, DataOutput out, int valueCount, int bitsPerValue, int mem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long v)
Add a value to the stream.void
finish()
Perform end-of-stream operations.private void
flush()
protected PackedInts.Format
getFormat()
The format used to serialize values.int
ord()
Returns the current ord in the stream (number of values that have been written so far minus one).-
Methods inherited from class org.apache.lucene.util.packed.PackedInts.Writer
bitsPerValue
-
-
-
-
Field Detail
-
finished
boolean finished
-
format
final PackedInts.Format format
-
encoder
final BulkOperation encoder
-
nextBlocks
final byte[] nextBlocks
-
nextValues
final long[] nextValues
-
iterations
final int iterations
-
off
int off
-
written
int written
-
-
Constructor Detail
-
PackedWriter
PackedWriter(PackedInts.Format format, DataOutput out, int valueCount, int bitsPerValue, int mem)
-
-
Method Detail
-
getFormat
protected PackedInts.Format getFormat()
Description copied from class:PackedInts.Writer
The format used to serialize values.- Specified by:
getFormat
in classPackedInts.Writer
-
add
public void add(long v) throws java.io.IOException
Description copied from class:PackedInts.Writer
Add a value to the stream.- Specified by:
add
in classPackedInts.Writer
- Throws:
java.io.IOException
-
finish
public void finish() throws java.io.IOException
Description copied from class:PackedInts.Writer
Perform end-of-stream operations.- Specified by:
finish
in classPackedInts.Writer
- Throws:
java.io.IOException
-
flush
private void flush() throws java.io.IOException
- Throws:
java.io.IOException
-
ord
public int ord()
Description copied from class:PackedInts.Writer
Returns the current ord in the stream (number of values that have been written so far minus one).- Specified by:
ord
in classPackedInts.Writer
-
-