/** {@inheritDoc} */ @Override public int idOffset() { if (currentSubtree != null) return 0; if (currentEntry != null) return currentEntry.idOffset(); return 0; }
/** * Set the ObjectId for the entry from the raw binary representation. * * @param bs * the raw byte buffer to read from. At least 20 bytes after p * must be available within this byte array. * @param p * position to read the first byte of data from. */ public void setObjectIdFromRaw(byte[] bs, int p) { final int n = Constants.OBJECT_ID_LENGTH; System.arraycopy(bs, p, idBuffer(), idOffset(), n); }
/** * Obtain the ObjectId for the entry. * <p> * Using this method to compare ObjectId values between entries is * inefficient as it causes memory allocation. * * @return object identifier for the entry. */ public ObjectId getObjectId() { return ObjectId.fromRaw(idBuffer(), idOffset()); }
/** * 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()); }
/** {@inheritDoc} */ @Override public int idOffset() { if (currentSubtree != null) return 0; if (currentEntry != null) return currentEntry.idOffset(); return 0; }
@Override public int idOffset() { if (currentSubtree != null) return 0; if (currentEntry != null) return currentEntry.idOffset(); return 0; }
.getFileMode(), e.idBuffer(), e.idOffset()); entryIdx++;
/** * Set the ObjectId for the entry from the raw binary representation. * * @param bs * the raw byte buffer to read from. At least 20 bytes after p * must be available within this byte array. * @param p * position to read the first byte of data from. */ public void setObjectIdFromRaw(final byte[] bs, final int p) { final int n = Constants.OBJECT_ID_LENGTH; System.arraycopy(bs, p, idBuffer(), idOffset(), n); }
/** * Set the ObjectId for the entry from the raw binary representation. * * @param bs * the raw byte buffer to read from. At least 20 bytes after p * must be available within this byte array. * @param p * position to read the first byte of data from. */ public void setObjectIdFromRaw(byte[] bs, int p) { final int n = Constants.OBJECT_ID_LENGTH; System.arraycopy(bs, p, idBuffer(), idOffset(), n); }
/** * Obtain the ObjectId for the entry. * <p> * Using this method to compare ObjectId values between entries is * inefficient as it causes memory allocation. * * @return object identifier for the entry. */ public ObjectId getObjectId() { return ObjectId.fromRaw(idBuffer(), idOffset()); }
/** * Obtain the ObjectId for the entry. * <p> * Using this method to compare ObjectId values between entries is * inefficient as it causes memory allocation. * * @return object identifier for the entry. */ public ObjectId getObjectId() { return ObjectId.fromRaw(idBuffer(), idOffset()); }
/** * 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()); }
/** * 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()); }
.getFileMode(), e.idBuffer(), e.idOffset()); entryIdx++;
.getFileMode(), e.idBuffer(), e.idOffset()); entryIdx++;