Codota Logo
DirCacheTree.nameLength
Code IndexAdd Codota to your IDE (free)

How to use
nameLength
method
in
org.eclipse.jgit.dircache.DirCacheTree

Best Java code snippets using org.eclipse.jgit.dircache.DirCacheTree.nameLength (Showing top 12 results out of 315)

  • Common ways to obtain DirCacheTree
private void myMethod () {
DirCacheTree d =
  • Codota Iconnew DirCacheTree()
  • Codota IconDirCache dirCache;dirCache.getCacheTree(true)
  • Codota Iconnew DirCacheTree(in, new MutableInteger(), null)
  • Smart code suggestions by Codota
}
origin: org.eclipse.jgit/org.eclipse.jgit

private void appendName(StringBuilder r) {
  if (parent != null) {
    parent.appendName(r);
    r.append(getNameString());
    r.append('/');
  } else if (nameLength() > 0) {
    r.append(getNameString());
    r.append('/');
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

private int computeSize(final DirCacheEntry[] cache, int cIdx,
    final int pathOffset, final ObjectInserter ow)
    throws UnmergedPathException, IOException {
  final int endIdx = cIdx + entrySpan;
  int childIdx = 0;
  int entryIdx = cIdx;
  int size = 0;
  while (entryIdx < endIdx) {
    final DirCacheEntry e = cache[entryIdx];
    if (e.getStage() != 0)
      throw new UnmergedPathException(e);
    final byte[] ep = e.path;
    if (childIdx < childCnt) {
      final DirCacheTree st = children[childIdx];
      if (st.contains(ep, pathOffset, ep.length)) {
        final int stOffset = pathOffset + st.nameLength() + 1;
        st.writeTree(cache, entryIdx, stOffset, ow);
        size += entrySize(TREE, st.nameLength());
        entryIdx += st.entrySpan;
        childIdx++;
        continue;
      }
    }
    size += entrySize(e.getFileMode(), ep.length - pathOffset);
    entryIdx++;
  }
  return size;
}
origin: org.eclipse.jgit/org.eclipse.jgit

st.validate(cache, cCnt, cIdx, pathOff + st.nameLength() + 1);
cIdx += st.entrySpan;
entrySpan += st.entrySpan;
origin: org.eclipse.jgit/org.eclipse.jgit

mode = FileMode.TREE.getBits();
path = cep;
pathLen = pathOffset + s.nameLength();
return;
origin: sonia.jgit/org.eclipse.jgit

private void appendName(final StringBuilder r) {
  if (parent != null) {
    parent.appendName(r);
    r.append(getNameString());
    r.append('/');
  } else if (nameLength() > 0) {
    r.append(getNameString());
    r.append('/');
  }
}
origin: berlam/github-bucket

private void appendName(StringBuilder r) {
  if (parent != null) {
    parent.appendName(r);
    r.append(getNameString());
    r.append('/');
  } else if (nameLength() > 0) {
    r.append(getNameString());
    r.append('/');
  }
}
origin: sonia.jgit/org.eclipse.jgit

private int computeSize(final DirCacheEntry[] cache, int cIdx,
    final int pathOffset, final ObjectInserter ow)
    throws UnmergedPathException, IOException {
  final int endIdx = cIdx + entrySpan;
  int childIdx = 0;
  int entryIdx = cIdx;
  int size = 0;
  while (entryIdx < endIdx) {
    final DirCacheEntry e = cache[entryIdx];
    if (e.getStage() != 0)
      throw new UnmergedPathException(e);
    final byte[] ep = e.path;
    if (childIdx < childCnt) {
      final DirCacheTree st = children[childIdx];
      if (st.contains(ep, pathOffset, ep.length)) {
        final int stOffset = pathOffset + st.nameLength() + 1;
        st.writeTree(cache, entryIdx, stOffset, ow);
        size += entrySize(TREE, st.nameLength());
        entryIdx += st.entrySpan;
        childIdx++;
        continue;
      }
    }
    size += entrySize(e.getFileMode(), ep.length - pathOffset);
    entryIdx++;
  }
  return size;
}
origin: berlam/github-bucket

private int computeSize(final DirCacheEntry[] cache, int cIdx,
    final int pathOffset, final ObjectInserter ow)
    throws UnmergedPathException, IOException {
  final int endIdx = cIdx + entrySpan;
  int childIdx = 0;
  int entryIdx = cIdx;
  int size = 0;
  while (entryIdx < endIdx) {
    final DirCacheEntry e = cache[entryIdx];
    if (e.getStage() != 0)
      throw new UnmergedPathException(e);
    final byte[] ep = e.path;
    if (childIdx < childCnt) {
      final DirCacheTree st = children[childIdx];
      if (st.contains(ep, pathOffset, ep.length)) {
        final int stOffset = pathOffset + st.nameLength() + 1;
        st.writeTree(cache, entryIdx, stOffset, ow);
        size += entrySize(TREE, st.nameLength());
        entryIdx += st.entrySpan;
        childIdx++;
        continue;
      }
    }
    size += entrySize(e.getFileMode(), ep.length - pathOffset);
    entryIdx++;
  }
  return size;
}
origin: sonia.jgit/org.eclipse.jgit

st.validate(cache, cCnt, cIdx, pathOff + st.nameLength() + 1);
cIdx += st.entrySpan;
entrySpan += st.entrySpan;
origin: berlam/github-bucket

st.validate(cache, cCnt, cIdx, pathOff + st.nameLength() + 1);
cIdx += st.entrySpan;
entrySpan += st.entrySpan;
origin: sonia.jgit/org.eclipse.jgit

mode = FileMode.TREE.getBits();
path = cep;
pathLen = pathOffset + s.nameLength();
return;
origin: berlam/github-bucket

mode = FileMode.TREE.getBits();
path = cep;
pathLen = pathOffset + s.nameLength();
return;
org.eclipse.jgit.dircacheDirCacheTreenameLength

Popular methods of DirCacheTree

  • getChild
    Get the i-th child cache tree.
  • getChildCount
    Get the number of cached subtrees contained within this tree.
  • getEntrySpan
    Get the number of entries this tree spans within the DirCache. If this tree is not valid (see #isVal
  • <init>
  • appendName
  • computeSize
  • contains
  • getNameString
    Get the tree's name within its parent. This method is not very efficient and is primarily meant for
  • getObjectId
    Get the tree's ObjectId. If #isValid() returns false this method will return null.
  • insertChild
  • isValid
    Determine if this cache is currently valid. A valid cache tree knows how many org.eclipse.jgit.dirca
  • namecmp
  • isValid,
  • namecmp,
  • peq,
  • removeChild,
  • slash,
  • validate,
  • write,
  • writeTree,
  • getPathString

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • JFileChooser (javax.swing)
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now