Tabnine Logo
DirCacheTree.nameLength
Code IndexAdd Tabnine 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)

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
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JPanel (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now