@Override int valueType() { int cnt = blockPos.size(); return cnt != 0 && cnt <= VALUE_TYPE_MASK ? cnt : 0; }
@Override void writeValue(ReftableOutputStream os) throws IOException { int cnt = blockPos.size(); if (cnt == 0) { os.writeVarint(0); return; } if (cnt > VALUE_TYPE_MASK) { os.writeVarint(cnt); } os.writeVarint(blockPos.get(0)); for (int j = 1; j < cnt; j++) { long prior = blockPos.get(j - 1); long b = blockPos.get(j); os.writeVarint(b - prior); } } }
@Override int valueSize() { int cnt = blockPos.size(); if (cnt == 0) { return computeVarintSize(0); } int n = 0; if (cnt > VALUE_TYPE_MASK) { n += computeVarintSize(cnt); } n += computeVarintSize(blockPos.get(0)); for (int j = 1; j < cnt; j++) { long prior = blockPos.get(j - 1); long b = blockPos.get(j); n += computeVarintSize(b - prior); } return n; }
@Override int valueType() { int cnt = blockPos.size(); return cnt != 0 && cnt <= VALUE_TYPE_MASK ? cnt : 0; }
blockPos = EMPTY_LONG_LIST; if (blockPos.size() > 0) { long pos = blockPos.get(listIdx++); block = readBlock(pos, scanEnd);
long pos; if (blockPos != null) { if (listIdx >= blockPos.size()) { return false;
private int findStreamIndex(long streamPosition) throws DhtException { int high = objStreamPos.size(); int low = 0; do { final int mid = (low + high) >>> 1; final long pos = objStreamPos.get(mid); if (streamPosition < pos) high = mid; else if (streamPosition == pos) return mid; else low = mid + 1; } while (low < high); throw new DhtException(MessageFormat.format( DhtText.get().noSavedTypeForBase, Long.valueOf(streamPosition))); }
private int findStreamIndex(long streamPosition) throws DhtException { int high = objStreamPos.size(); int low = 0; do { final int mid = (low + high) >>> 1; final long pos = objStreamPos.get(mid); if (streamPosition < pos) high = mid; else if (streamPosition == pos) return mid; else low = mid + 1; } while (low < high); throw new DhtException(MessageFormat.format( DhtText.get().noSavedTypeForBase, Long.valueOf(streamPosition))); }
@Override int valueSize() { int cnt = blockPos.size(); if (cnt == 0) { return computeVarintSize(0); } int n = 0; if (cnt > VALUE_TYPE_MASK) { n += computeVarintSize(cnt); } n += computeVarintSize(blockPos.get(0)); for (int j = 1; j < cnt; j++) { long prior = blockPos.get(j - 1); long b = blockPos.get(j); n += computeVarintSize(b - prior); } return n; }
@Override void writeValue(ReftableOutputStream os) throws IOException { int cnt = blockPos.size(); if (cnt == 0) { os.writeVarint(0); return; } if (cnt > VALUE_TYPE_MASK) { os.writeVarint(cnt); } os.writeVarint(blockPos.get(0)); for (int j = 1; j < cnt; j++) { long prior = blockPos.get(j - 1); long b = blockPos.get(j); os.writeVarint(b - prior); } } }
blockPos = EMPTY_LONG_LIST; if (blockPos.size() > 0) { long pos = blockPos.get(listIdx++); block = readBlock(pos, scanEnd);
long pos; if (blockPos != null) { if (listIdx >= blockPos.size()) { return false;