5859606162636465666768
for (int i = 0; i < FILE_COUNT; i++) { Node file = root.getNode("file" + i); Node content = file.getNode("jcr:content"); InputStream stream = content.getProperty("jcr:data").getStream(); try { ByteStreams.copy(stream, new NullOutputStream()); } finally { stream.close(); } } }
165166167168169170171172173174175
try { for (int i = 0; i < stms.length; i++) { stms[i] = fs.open(TEST_FILE); } for (InputStream stm : stms) { IOUtils.copyBytes(stm, new NullOutputStream(), 1024); } } finally { IOUtils.cleanup(null, stms); }