Package org.eclipse.jgit.internal.storage.file

Examples of org.eclipse.jgit.internal.storage.file.PackIndexWriter


  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (isIndexDisabled())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final PackIndexWriter iw = PackIndexWriter.createVersion(
        indexStream, getIndexVersion());
    iw.write(sortByName(), packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here


    File packFile = new File(packDir, packName + ".pack");
    FileUtils.mkdir(packDir, true);
    OutputStream dst = new SafeBufferedOutputStream(new FileOutputStream(
        idxFile));
    try {
      PackIndexWriter writer = new PackIndexWriterV2(dst);
      writer.write(objects, new byte[OBJECT_ID_LENGTH]);
    } finally {
      dst.close();
    }
    new FileOutputStream(packFile).close();
View Full Code Here

  public void writeIndex(final OutputStream indexStream) throws IOException {
    if (isIndexDisabled())
      throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation);

    long writeStart = System.currentTimeMillis();
    final PackIndexWriter iw = PackIndexWriter.createVersion(
        indexStream, getIndexVersion());
    iw.write(sortByName(), packcsum);
    stats.timeWriting += System.currentTimeMillis() - writeStart;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.internal.storage.file.PackIndexWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.