634635636637638639640641642643644
content.setProperty(Property.JCR_LAST_MODIFIED, date); content.setProperty(Property.JCR_DATA, binary); return file; } finally { binary.dispose(); } } /** * Returns a string representation of the given item. The returned string
629630631632633634635636637638639
702703704705706707708709710711712
try { builder.append("<"); builder.append(binary.getSize()); builder.append(" bytes>"); } finally { binary.dispose(); } } else { String string = value.getString(); if (string.length() > 40) { builder.append(string.substring(0, 37));
7172737475767778798081
} return out.toByteArray(); } finally { binary.dispose(); } } return null; }
514515516517518519520521522523524
final Binary binary = getValue().getBinary(); // make sure binary is disposed after stream had been consumed return new AutoCloseInputStream(binary.getStream()) { public void close() throws IOException { super.close(); binary.dispose(); } }; } /** Wrapper around {@link #getValue()} */
652653654655656657658659660661662
if (value != null) { Binary binary = getValueFactory().createBinary(value); try { setValue(getValueFactory().createValue(binary)); } finally { binary.dispose(); } } else { setValue((Value) null); } }
345346347348349350351352353354355
in = bin.getStream(); IOUtils.copy(in, out); } finally { IOUtils.closeQuietly(in); IOUtils.closeQuietly(out); bin.dispose(); } pack = new ZipVaultPackage(tmpFile, true); } } return pack;
166167168169170171172173174175176
IOUtil.spool(in, out); } finally { in.close(); } } finally { binary.dispose(); } } catch (RepositoryException e) { log.error("Cannot obtain stream from " + item, e); } }
18961897189818991900190119021903190419051906
if (value != null) { Binary binary = getValueFactory().createBinary(value); try { return setProperty(name, getValueFactory().createValue(binary)); } finally { binary.dispose(); } } else { return setProperty(name, (Value) null); } }
146147148149150151152153154155156
dispose = true; blob = getBLOBFileValue(store, b.getStream(), true); } } finally { if (dispose) { b.dispose(); } } } return new InternalValue(blob); case PropertyType.BOOLEAN: