InputSteam to OutputStream
作者:互联网
原文链接:https://my.oschina.net/u/2296689/blog/545737
InputStream in = node.getProperty("jcr:data").getStream();
ByteArrayOutputStream out = new ByteArrayOutputStream(500 * 1024);
makeThumbnail(in, out);
out.flush();
node.setProperty("dms:Thumbnail", new ByteArrayInputStream(out
.toByteArray()));
node.save();
InputStream in = node.getProperty("jcr:data").getStream();
ByteArrayOutputStream out = new ByteArrayOutputStream(500 * 1024);
makeThumbnail(in, out);
out.flush();
node.setProperty("dms:Thumbnail", new ByteArrayInputStream(out
.toByteArray()));
node.save();
转载于:https://my.oschina.net/u/2296689/blog/545737
标签:node,OutputStream,oschina,blog,2296689,https,InputSteam,out 来源: https://blog.csdn.net/chuoxieai9700/article/details/100904889