Class PackIndexWriterV1

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

class PackIndexWriterV1 extends PackIndexWriter
Creates the version 1 (old style) pack table of contents files.
See Also:
  • Constructor Details

  • Method Details

    • canStore

      static boolean canStore(PackedObjectInfo oe)
    • 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.