Package org.eclipse.jgit.revwalk

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);

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


    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);

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

    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

    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

    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

    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

    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

    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

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.