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) BulkOperationencoder(package private) booleanfinished(package private) PackedInts.Formatformat(package private) intiterations(package private) byte[]nextBlocks(package private) long[]nextValues(package private) intoff(package private) intwritten-
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 voidadd(long v)Add a value to the stream.voidfinish()Perform end-of-stream operations.private voidflush()protected PackedInts.FormatgetFormat()The format used to serialize values.intord()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, writeHeader
-
-
-
-
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.WriterThe format used to serialize values.- Specified by:
getFormatin classPackedInts.Writer
-
add
public void add(long v) throws java.io.IOExceptionDescription copied from class:PackedInts.WriterAdd a value to the stream.- Specified by:
addin classPackedInts.Writer- Throws:
java.io.IOException
-
finish
public void finish() throws java.io.IOExceptionDescription copied from class:PackedInts.WriterPerform end-of-stream operations.- Specified by:
finishin 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.WriterReturns the current ord in the stream (number of values that have been written so far minus one).- Specified by:
ordin classPackedInts.Writer
-
-