/** {@inheritDoc} */ @Override public boolean hasId() { if (currentSubtree != null) return currentSubtree.isValid(); return currentEntry != null; }
/** {@inheritDoc} */ @Override public byte[] idBuffer() { if (currentSubtree != null) return currentSubtree.isValid() ? subtreeId : zeroid; if (currentEntry != null) return currentEntry.idBuffer(); return zeroid; }
void write(byte[] tmp, OutputStream os) throws IOException { int ptr = tmp.length; tmp[--ptr] = '\n'; ptr = RawParseUtils.formatBase10(tmp, ptr, childCnt); tmp[--ptr] = ' '; ptr = RawParseUtils.formatBase10(tmp, ptr, isValid() ? entrySpan : -1); tmp[--ptr] = 0; os.write(encodedName); os.write(tmp, ptr, tmp.length - ptr); if (isValid()) { id.copyRawTo(tmp, 0); os.write(tmp, 0, Constants.OBJECT_ID_LENGTH); } for (int i = 0; i < childCnt; i++) children[i].write(tmp, os); }
/** {@inheritDoc} */ @Override public boolean hasId() { if (currentSubtree != null) return currentSubtree.isValid(); return currentEntry != null; }
@Override public boolean hasId() { if (currentSubtree != null) return currentSubtree.isValid(); return currentEntry != null; }
/** {@inheritDoc} */ @Override public byte[] idBuffer() { if (currentSubtree != null) return currentSubtree.isValid() ? subtreeId : zeroid; if (currentEntry != null) return currentEntry.idBuffer(); return zeroid; }
@Override public byte[] idBuffer() { if (currentSubtree != null) return currentSubtree.isValid() ? subtreeId : zeroid; if (currentEntry != null) return currentEntry.idBuffer(); return zeroid; }
nextSubtreePos++; if (s.isValid()) s.getObjectId().copyRawTo(subtreeId, 0); mode = FileMode.TREE.getBits();
void write(final byte[] tmp, final OutputStream os) throws IOException { int ptr = tmp.length; tmp[--ptr] = '\n'; ptr = RawParseUtils.formatBase10(tmp, ptr, childCnt); tmp[--ptr] = ' '; ptr = RawParseUtils.formatBase10(tmp, ptr, isValid() ? entrySpan : -1); tmp[--ptr] = 0; os.write(encodedName); os.write(tmp, ptr, tmp.length - ptr); if (isValid()) { id.copyRawTo(tmp, 0); os.write(tmp, 0, Constants.OBJECT_ID_LENGTH); } for (int i = 0; i < childCnt; i++) children[i].write(tmp, os); }
void write(byte[] tmp, OutputStream os) throws IOException { int ptr = tmp.length; tmp[--ptr] = '\n'; ptr = RawParseUtils.formatBase10(tmp, ptr, childCnt); tmp[--ptr] = ' '; ptr = RawParseUtils.formatBase10(tmp, ptr, isValid() ? entrySpan : -1); tmp[--ptr] = 0; os.write(encodedName); os.write(tmp, ptr, tmp.length - ptr); if (isValid()) { id.copyRawTo(tmp, 0); os.write(tmp, 0, Constants.OBJECT_ID_LENGTH); } for (int i = 0; i < childCnt; i++) children[i].write(tmp, os); }
nextSubtreePos++; if (s.isValid()) s.getObjectId().copyRawTo(subtreeId, 0); mode = FileMode.TREE.getBits();
nextSubtreePos++; if (s.isValid()) s.getObjectId().copyRawTo(subtreeId, 0); mode = FileMode.TREE.getBits();