@Override public boolean isLarge() { return delegate().isLarge(); }
void hash(ObjectLoader obj) throws MissingObjectException, IOException, TableFullException { if (obj.isLarge()) { hashLargeObject(obj); } else { byte[] raw = obj.getCachedBytes(); hash(raw, 0, raw.length); } }
if (isLarge()) { try (ObjectStream in = openStream()) { final long sz = in.getSize();
if (!isLarge()) return getCachedBytes();
@Override public boolean isLarge() { return delegate().isLarge(); }
void hash(ObjectLoader obj) throws MissingObjectException, IOException, TableFullException { if (obj.isLarge()) { hashLargeObject(obj); } else { byte[] raw = obj.getCachedBytes(); hash(raw, 0, raw.length); } }
void hash(ObjectLoader obj) throws MissingObjectException, IOException, TableFullException { if (obj.isLarge()) { hashLargeObject(obj); } else { byte[] raw = obj.getCachedBytes(); hash(raw, 0, raw.length); } }
if (isLarge()) { try (ObjectStream in = openStream()) { final long sz = in.getSize();
if (isLarge()) { ObjectStream in = openStream(); try {
/** * Get note text. This method open and read the note blob each time it is * called. * * @return note text or empty string if lookup failed. */ public String getNoteText() { try { ObjectLoader loader = commit.getRepository().open(note.getData(), Constants.OBJ_BLOB); byte[] contents; if (loader.isLarge()) contents = IO.readWholeStream(loader.openStream(), (int) loader.getSize()).array(); else contents = loader.getCachedBytes(); return new String(contents); } catch (IOException e) { Activator.logError("Error loading note text", e); //$NON-NLS-1$ } return ""; //$NON-NLS-1$ }
if (!isLarge()) return getCachedBytes();
if (!isLarge()) return getCachedBytes();