Examples of ObjectReuseAsIs


Examples of org.eclipse.jgit.internal.storage.pack.ObjectReuseAsIs

  }

  private static byte[] getDelta(ObjectReader reader, RevObject obj)
      throws IOException, MissingObjectException,
      StoredObjectRepresentationNotAvailableException {
    ObjectReuseAsIs asis = (ObjectReuseAsIs) reader;
    ObjectToPack target = asis.newObjectToPack(obj, obj.getType());

    PackWriter pw = new PackWriter(reader) {
      @Override
      public void select(ObjectToPack otp, StoredObjectRepresentation next) {
        otp.select(next);
      }
    };

    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    asis.selectObjectRepresentation(pw, NullProgressMonitor.INSTANCE,
        Collections.singleton(target));
    asis.copyObjectAsIs(new PackOutputStream(NullProgressMonitor.INSTANCE,
        buf, pw), target, true);

    // At this point the object header has no delta information,
    // because it was output as though it were a whole object.
    // Skip over the header and inflate.
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.pack.ObjectReuseAsIs

  }

  private static byte[] getDelta(ObjectReader reader, RevObject obj)
      throws IOException, MissingObjectException,
      StoredObjectRepresentationNotAvailableException {
    ObjectReuseAsIs asis = (ObjectReuseAsIs) reader;
    ObjectToPack target = asis.newObjectToPack(obj, obj.getType());

    PackWriter pw = new PackWriter(reader) {
      @Override
      public void select(ObjectToPack otp, StoredObjectRepresentation next) {
        otp.select(next);
      }
    };

    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    asis.selectObjectRepresentation(pw, NullProgressMonitor.INSTANCE,
        Collections.singleton(target));
    asis.copyObjectAsIs(new PackOutputStream(NullProgressMonitor.INSTANCE,
        buf, pw), target, true);

    // At this point the object header has no delta information,
    // because it was output as though it were a whole object.
    // Skip over the header and inflate.
View Full Code Here

Examples of org.eclipse.jgit.storage.pack.ObjectReuseAsIs

  }

  private byte[] getDelta(ObjectReader reader, RevObject obj)
      throws IOException, MissingObjectException,
      StoredObjectRepresentationNotAvailableException {
    ObjectReuseAsIs asis = (ObjectReuseAsIs) reader;
    ObjectToPack target = asis.newObjectToPack(obj);

    PackWriter pw = new PackWriter(reader) {
      @Override
      public void select(ObjectToPack otp, StoredObjectRepresentation next) {
        otp.select(next);
      }
    };

    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    asis.selectObjectRepresentation(pw, target);
    asis.copyObjectAsIs(new PackOutputStream(NullProgressMonitor.INSTANCE,
        buf, pw), target);

    // At this point the object header has no delta information,
    // because it was output as though it were a whole object.
    // Skip over the header and inflate.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.