/** * Write a non-null {@link ObjectId} to the stream. * * @param out * the output stream * @param id * the object id to serialize; never null * @throws IOException * the stream writing failed * @since 4.11 */ public static void writeWithoutMarker(OutputStream out, @NonNull AnyObjectId id) throws IOException { id.copyRawTo(out); }
/** * Set the ObjectId for the entry. * * @param id * new object identifier for the entry. May be * {@link org.eclipse.jgit.lib.ObjectId#zeroId()} to remove the * current identifier. */ public void setObjectId(AnyObjectId id) { id.copyRawTo(idBuffer(), idOffset()); }
/** * Create impact * * @param commit * @param add * @param edit * @param delete */ public CommitImpact(AnyObjectId commit, int add, int edit, int delete) { this.commit = new byte[OBJECT_ID_LENGTH]; commit.copyRawTo(this.commit, 0); this.add = add; this.edit = edit; this.delete = delete; }
/** * Write a non-null {@link ObjectId} to the stream. * * @param out * the output stream * @param id * the object id to serialize; never null * @throws IOException * the stream writing failed * @since 4.11 */ public static void writeWithoutMarker(OutputStream out, @NonNull AnyObjectId id) throws IOException { id.copyRawTo(out); }
boolean refDelta(long inflatedSize, AnyObjectId baseId) { if (free() < 30 || maxObjects <= objectsTotal) return false; header(Constants.OBJ_REF_DELTA, inflatedSize); objectsRefDelta++; currentObjectType = Constants.OBJ_REF_DELTA; baseId.copyRawTo(chunkData, ptr); ptr += 20; return true; }
/** * Set the ObjectId for the entry. * * @param id * new object identifier for the entry. May be * {@link ObjectId#zeroId()} to remove the current identifier. */ public void setObjectId(final AnyObjectId id) { id.copyRawTo(idBuffer(), idOffset()); }
boolean refDelta(long inflatedSize, AnyObjectId baseId) { if (free() < 30 || maxObjects <= objectsTotal) return false; header(Constants.OBJ_REF_DELTA, inflatedSize); objectsRefDelta++; currentObjectType = Constants.OBJ_REF_DELTA; baseId.copyRawTo(chunkData, ptr); ptr += 20; return true; }
/** * Set the ObjectId for the entry. * * @param id * new object identifier for the entry. May be * {@link org.eclipse.jgit.lib.ObjectId#zeroId()} to remove the * current identifier. */ public void setObjectId(AnyObjectId id) { id.copyRawTo(idBuffer(), idOffset()); }