Class PackObjectSizeIndexWriter

java.lang.Object
org.eclipse.jgit.internal.storage.file.PackObjectSizeIndexWriter

public abstract class PackObjectSizeIndexWriter extends Object
Write an object index in the output stream
  • Field Details

  • Constructor Details

    • PackObjectSizeIndexWriter

      public PackObjectSizeIndexWriter()
  • Method Details

    • createWriter

      public static PackObjectSizeIndexWriter createWriter(OutputStream os, int minSize)
      Returns a writer for the latest index version
      Parameters:
      os - Output stream where to write the index
      minSize - objects strictly smaller than this size won't be added to the index. Negative size won't write AT ALL. Other sizes could write an empty index.
      Returns:
      the index writer
    • write

      public abstract void write(List<? extends PackedObjectInfo> objs) throws IOException
      Add the objects to the index
      Parameters:
      objs - objects in the pack, in sha1 order. Their position in the list matches their position in the primary index.
      Throws:
      IOException - problem writing to the stream