Examples of copyRawTo()


Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 14);
    a.copyRawTo(pack);
    deflate(pack, new byte[] { 1, 11, 11, 'a', '0', '1', '2', '3', '4',
        '5', '6', '7', '8', '9' });
    digest(pack);

    PackParser p = index(new ByteArrayInputStream(pack.toByteArray()));
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
    deflate(pack, new byte[] { 10, 11, 1, 'a' });
    digest(pack);

    PackParser p = index(new ByteArrayInputStream(pack.toByteArray()));
    p.setAllowThin(true);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);
    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
    deflate(pack, new byte[] { 0x1, 0x1, 0x1, 'b' });
    digest(pack);

    InputStream in = new ByteArrayInputStream(pack.toByteArray()) {
      @Override
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    RevBlob a = d.blob("a");

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(32*1024);
    packHeader(pack, 1);
    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
    deflate(pack, new byte[] { 0x1, 0x1, 0x1, 'b' });
    digest(pack);

    byte packData[] = pack.toByteArray();
    byte streamData[] = new byte[packData.length + 1];
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    for (int i = 0; i < objects; i++) {
      // The last pack header written falls across the 8192 byte boundary
      // between [8189:8210]
      pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
      b.copyRawTo(pack);
      deflate(pack, new byte[] { 0x1, 0x1, 0x1, 'b' });
    }
    digest(pack);

    byte packData[] = pack.toByteArray();
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.copyRawTo()

    TemporaryBuffer.Heap pack = new TemporaryBuffer.Heap(1024);

    packHeader(pack, 1);

    pack.write((Constants.OBJ_REF_DELTA) << 4 | 4);
    a.copyRawTo(pack);
    deflate(pack, new byte[] { 0x1, 0x1, 0x1, 'b' });

    digest(pack);

    final byte[] raw = pack.toByteArray();
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevCommit.copyRawTo()

    final int size = (UserCommitActivity.SIZE * UserCommitActivity.GROWTH) + 2;
    for (int i = 0; i < size; i++)
      user.include(commit, author);
    assertEquals(size, user.getCount());
    byte[] commitId = new byte[Constants.OBJECT_ID_LENGTH];
    commit.copyRawTo(commitId, 0);
    for (byte[] id : user.getRawIds())
      assertTrue(Arrays.equals(commitId, id));
    for (ObjectId id : user.getIds())
      assertEquals(commit, id);
  }
View Full Code Here

Examples of org.eclipse.jgit.transport.PackedObjectInfo.copyRawTo()

    final MessageDigest d = Constants.newMessageDigest();
    final byte[] oeBytes = new byte[Constants.OBJECT_ID_LENGTH];
    for (int i = 0; i < getObjectCount(); i++) {
      final PackedObjectInfo oe = getObject(i);
      oe.copyRawTo(oeBytes, 0);
      d.update(oeBytes);
    }

    final String name = ObjectId.fromRaw(d.digest()).name();
    final File packDir = new File(db.getDirectory(), "pack");
View Full Code Here

Examples of org.eclipse.jgit.transport.PackedObjectInfo.copyRawTo()

    final MessageDigest d = Constants.newMessageDigest();
    final byte[] oeBytes = new byte[Constants.OBJECT_ID_LENGTH];
    for (int i = 0; i < getObjectCount(); i++) {
      final PackedObjectInfo oe = getObject(i);
      oe.copyRawTo(oeBytes, 0);
      d.update(oeBytes);
    }

    final String name = ObjectId.fromRaw(d.digest()).name();
    final File packDir = new File(db.getDirectory(), "pack");
View Full Code Here

Examples of org.eclipse.jgit.transport.PackedObjectInfo.copyRawTo()

    final MessageDigest d = Constants.newMessageDigest();
    final byte[] oeBytes = new byte[Constants.OBJECT_ID_LENGTH];
    for (int i = 0; i < getObjectCount(); i++) {
      final PackedObjectInfo oe = getObject(i);
      oe.copyRawTo(oeBytes, 0);
      d.update(oeBytes);
    }

    final String name = ObjectId.fromRaw(d.digest()).name();
    final File packDir = new File(db.getDirectory(), "pack");
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.