Class PackedInts.Writer

  • Enclosing class:
    PackedInts

    public abstract static class PackedInts.Writer
    extends java.lang.Object
    A write-once Writer.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Writer​(DataOutput out, int valueCount, int bitsPerValue)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void add​(long v)
      Add a value to the stream.
      int bitsPerValue()
      The number of bits per value.
      abstract void finish()
      Perform end-of-stream operations.
      protected abstract PackedInts.Format getFormat()
      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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.io.IOException
        Add a value to the stream.
        Throws:
        java.io.IOException
      • bitsPerValue

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

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

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