Class PackedInts.Writer

  • Enclosing class:

    public abstract static class PackedInts.Writer
    extends Object
    A write-once Writer.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Field Detail

      • valueCount

        protected final int valueCount
      • bitsPerValue

        protected final int bitsPerValue
    • Constructor Detail

      • Writer

        protected Writer​(DataOutput out,
                         int valueCount,
                         int bitsPerValue)
    • Method Detail

      • getFormat

        protected abstract PackedInts.Format getFormat()
        The format used to serialize values.
      • add

        public abstract void add​(long v)
                          throws IOException
        Add a value to the stream.
      • bitsPerValue

        public final int bitsPerValue()
        The number of bits per value.
      • finish

        public abstract void finish()
                             throws IOException
        Perform end-of-stream operations.
      • ord

        public abstract int ord()
        Returns the current ord in the stream (number of values that have been written so far minus one).