/** * Get the internal buffer holding the current path. * * @return the internal buffer holding the current path. */ public byte[] getPathBuffer() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathBuf; }
/** * Get length of the path in {@link #getPathBuffer()}. * * @return length of the path in {@link #getPathBuffer()}. */ public int getPathLength() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathLen; }
nameEnd = pathLen; if (nameEnd == 0) { nameEnd = updatePathBuf(currVisit); pathLen = nameEnd;
/** * Get the current object's complete path. * <p> * This method is not very efficient and is primarily meant for debugging * and final output generation. Applications should try to avoid calling it, * and if invoked do so only once per interesting entry, where the name is * absolutely required for correct function. * * @return complete path of the current entry, from the root of the * repository. If the current entry is in a subtree there will be at * least one '/' in the returned string. Null if the current entry * has no path, such as for annotated tags or root level trees. */ public String getPathString() { if (pathLen == 0) { pathLen = updatePathBuf(currVisit); if (pathLen == 0) return null; } return RawParseUtils.decode(pathBuf, 0, pathLen); }
private int updatePathBuf(TreeVisit tv) { if (tv == null) return 0; // If nameEnd == 0 this tree has not yet contributed an entry. // Update only for the parent, which if null will be empty. int nameEnd = tv.nameEnd; if (nameEnd == 0) return updatePathBuf(tv.parent); int ptr = tv.pathLen; if (ptr == 0) { ptr = updatePathBuf(tv.parent); if (ptr == pathBuf.length) growPathBuf(ptr); if (ptr != 0) pathBuf[ptr++] = '/'; tv.pathLen = ptr; } int namePtr = tv.namePtr; int nameLen = nameEnd - namePtr; int end = ptr + nameLen; while (pathBuf.length < end) growPathBuf(ptr); System.arraycopy(tv.buf, namePtr, pathBuf, ptr, nameLen); return end; }
/** @return the internal buffer holding the current path. */ public byte[] getPathBuffer() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathBuf; }
/** * Get the internal buffer holding the current path. * * @return the internal buffer holding the current path. */ public byte[] getPathBuffer() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathBuf; }
/** @return length of the path in {@link #getPathBuffer()}. */ public int getPathLength() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathLen; }
/** * Get length of the path in {@link #getPathBuffer()}. * * @return length of the path in {@link #getPathBuffer()}. */ public int getPathLength() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathLen; }
/** * Get the internal buffer holding the current path. * * @return the internal buffer holding the current path. */ public byte[] getPathBuffer() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathBuf; }
/** * Get length of the path in {@link #getPathBuffer()}. * * @return length of the path in {@link #getPathBuffer()}. */ public int getPathLength() { if (pathLen == 0) pathLen = updatePathBuf(currVisit); return pathLen; }
nameEnd = pathLen; if (nameEnd == 0) { nameEnd = updatePathBuf(currVisit); pathLen = nameEnd;
nameEnd = pathLen; if (nameEnd == 0) { nameEnd = updatePathBuf(currVisit); pathLen = nameEnd;
nameEnd = pathLen; if (nameEnd == 0) { nameEnd = updatePathBuf(currVisit); pathLen = nameEnd;
/** * Get the current object's complete path. * <p> * This method is not very efficient and is primarily meant for debugging * and final output generation. Applications should try to avoid calling it, * and if invoked do so only once per interesting entry, where the name is * absolutely required for correct function. * * @return complete path of the current entry, from the root of the * repository. If the current entry is in a subtree there will be at * least one '/' in the returned string. Null if the current entry * has no path, such as for annotated tags or root level trees. */ public String getPathString() { if (pathLen == 0) { pathLen = updatePathBuf(currVisit); if (pathLen == 0) return null; } return RawParseUtils.decode(pathBuf, 0, pathLen); }
/** * Get the current object's complete path. * <p> * This method is not very efficient and is primarily meant for debugging * and final output generation. Applications should try to avoid calling it, * and if invoked do so only once per interesting entry, where the name is * absolutely required for correct function. * * @return complete path of the current entry, from the root of the * repository. If the current entry is in a subtree there will be at * least one '/' in the returned string. Null if the current entry * has no path, such as for annotated tags or root level trees. */ public String getPathString() { if (pathLen == 0) { pathLen = updatePathBuf(currVisit); if (pathLen == 0) return null; } return RawParseUtils.decode(pathBuf, 0, pathLen); }
/** * Get the current object's complete path. * <p> * This method is not very efficient and is primarily meant for debugging * and final output generation. Applications should try to avoid calling it, * and if invoked do so only once per interesting entry, where the name is * absolutely required for correct function. * * @return complete path of the current entry, from the root of the * repository. If the current entry is in a subtree there will be at * least one '/' in the returned string. Null if the current entry * has no path, such as for annotated tags or root level trees. */ public String getPathString() { if (pathLen == 0) { pathLen = updatePathBuf(currVisit); if (pathLen == 0) return null; } return RawParseUtils.decode(pathBuf, 0, pathLen); }
private int updatePathBuf(TreeVisit tv) { if (tv == null) return 0; // If nameEnd == 0 this tree has not yet contributed an entry. // Update only for the parent, which if null will be empty. int nameEnd = tv.nameEnd; if (nameEnd == 0) return updatePathBuf(tv.parent); int ptr = tv.pathLen; if (ptr == 0) { ptr = updatePathBuf(tv.parent); if (ptr == pathBuf.length) growPathBuf(ptr); if (ptr != 0) pathBuf[ptr++] = '/'; tv.pathLen = ptr; } int namePtr = tv.namePtr; int nameLen = nameEnd - namePtr; int end = ptr + nameLen; while (pathBuf.length < end) growPathBuf(ptr); System.arraycopy(tv.buf, namePtr, pathBuf, ptr, nameLen); return end; }
private int updatePathBuf(TreeVisit tv) { if (tv == null) return 0; // If nameEnd == 0 this tree has not yet contributed an entry. // Update only for the parent, which if null will be empty. int nameEnd = tv.nameEnd; if (nameEnd == 0) return updatePathBuf(tv.parent); int ptr = tv.pathLen; if (ptr == 0) { ptr = updatePathBuf(tv.parent); if (ptr == pathBuf.length) growPathBuf(ptr); if (ptr != 0) pathBuf[ptr++] = '/'; tv.pathLen = ptr; } int namePtr = tv.namePtr; int nameLen = nameEnd - namePtr; int end = ptr + nameLen; while (pathBuf.length < end) growPathBuf(ptr); System.arraycopy(tv.buf, namePtr, pathBuf, ptr, nameLen); return end; }
private int updatePathBuf(TreeVisit tv) { if (tv == null) return 0; // If nameEnd == 0 this tree has not yet contributed an entry. // Update only for the parent, which if null will be empty. int nameEnd = tv.nameEnd; if (nameEnd == 0) return updatePathBuf(tv.parent); int ptr = tv.pathLen; if (ptr == 0) { ptr = updatePathBuf(tv.parent); if (ptr == pathBuf.length) growPathBuf(ptr); if (ptr != 0) pathBuf[ptr++] = '/'; tv.pathLen = ptr; } int namePtr = tv.namePtr; int nameLen = nameEnd - namePtr; int end = ptr + nameLen; while (pathBuf.length < end) growPathBuf(ptr); System.arraycopy(tv.buf, namePtr, pathBuf, ptr, nameLen); return end; }