Class PackIndexWriterV2

    • Constructor Detail

      • PackIndexWriterV2

        PackIndexWriterV2​(java.io.OutputStream dst)
    • Method Detail

      • writeImpl

        protected void writeImpl()
                          throws java.io.IOException
        Writes the index file to PackIndexWriter.out.

        Implementations should go something like:

         writeFanOutTable();
         for (final PackedObjectInfo po : entries)
                writeOneEntry(po);
         writeChecksumFooter();
         

        Where the logic for writeOneEntry is specific to the index format in use. Additional headers/footers may be used if necessary and the PackIndexWriter.entries collection may be iterated over more than once if necessary. Implementors therefore have complete control over the data.

        Specified by:
        writeImpl in class PackIndexWriter
        Throws:
        java.io.IOException - an error occurred while writing to the output stream, or this index format cannot store the object data supplied.
      • writeObjectNames

        private void writeObjectNames()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeCRCs

        private void writeCRCs()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • writeOffset32

        private void writeOffset32()
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writeOffset64

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