Class PackBitmapIndexWriterV1


  • public class PackBitmapIndexWriterV1
    extends java.lang.Object
    Creates the version 1 pack bitmap index files.
    See Also:
    PackBitmapIndexV1
    • Field Detail

      • out

        private final java.security.DigestOutputStream out
      • dataOutput

        private final java.io.DataOutput dataOutput
    • Constructor Detail

      • PackBitmapIndexWriterV1

        public PackBitmapIndexWriterV1​(java.io.OutputStream dst)
        Creates the version 1 pack bitmap index files.
        Parameters:
        dst - the output stream to which the index will be written.
    • Method Detail

      • write

        public void write​(PackBitmapIndexBuilder bitmaps,
                          byte[] packDataChecksum)
                   throws java.io.IOException
        Write all object entries to the index stream.

        After writing the stream passed to the factory is flushed but remains open. Callers are always responsible for closing the output stream.

        Parameters:
        bitmaps - the index data for the bitmaps
        packDataChecksum - checksum signature of the entire pack data content. This is traditionally the last 20 bytes of the pack file's own stream.
        Throws:
        java.io.IOException - an error occurred while writing to the output stream, or this index format cannot store the object data supplied.
      • writeHeader

        private void writeHeader​(int options,
                                 int bitmapCount,
                                 byte[] packDataChecksum)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeBody

        private void writeBody​(PackBitmapIndexBuilder bitmaps)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • writeBitmap

        private void writeBitmap​(com.googlecode.javaewah.EWAHCompressedBitmap bitmap)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeBitmaps

        private void writeBitmaps​(PackBitmapIndexBuilder bitmaps)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeFooter

        private void writeFooter()
                          throws java.io.IOException
        Throws:
        java.io.IOException