Class PackIndexWriterV2

java.lang.Object
org.eclipse.jgit.internal.storage.file.PackIndexWriter
org.eclipse.jgit.internal.storage.file.PackIndexWriterV2

class PackIndexWriterV2 extends PackIndexWriter
Creates the version 2 pack table of contents files.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • writeImpl

      protected void writeImpl() throws 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:
      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 IOException
      Throws:
      IOException
    • writeCRCs

      private void writeCRCs() throws IOException
      Throws:
      IOException
    • writeOffset32

      private void writeOffset32() throws IOException
      Throws:
      IOException
    • writeOffset64

      private void writeOffset64() throws IOException
      Throws:
      IOException