Class AbstractBlockPackedWriter

    • Constructor Detail

      • AbstractBlockPackedWriter

        public AbstractBlockPackedWriter​(DataOutput out,
                                         int blockSize)
        Sole constructor.
        Parameters:
        blockSize - the number of values of a single block, must be a multiple of 64
    • Method Detail

      • writeVLong

        static void writeVLong​(DataOutput out,
                               long i)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • reset

        public void reset​(DataOutput out)
        Reset this writer to wrap out. The block size remains unchanged.
      • checkNotFinished

        private void checkNotFinished()
      • add

        public void add​(long l)
                 throws java.io.IOException
        Append a new long.
        Throws:
        java.io.IOException
      • addBlockOfZeros

        void addBlockOfZeros()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Flush all buffered data to disk. This instance is not usable anymore after this method has been called until reset(DataOutput) has been called.
        Throws:
        java.io.IOException
      • ord

        public long ord()
        Return the number of values which have been added.
      • flush

        protected abstract void flush()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeValues

        protected final void writeValues​(int bitsRequired)
                                  throws java.io.IOException
        Throws:
        java.io.IOException