primefaces p:graphicImage 流的用法
程序员文章站
2022-07-11 12:00:24
...
File f = new File("e:/1456199126737.jpg");
BufferedImage bufferedImg = ImageIO.read(f);
ByteArrayOutputStream os = new ByteArrayOutputStream();
ImageIO.write(bufferedImg, "jpeg", os);
StreamedContent image= new DefaultStreamedContent(new ByteArrayInputStream(os.toByteArray()), "image/jpeg");
BufferedImage bufferedImg = ImageIO.read(f);
ByteArrayOutputStream os = new ByteArrayOutputStream();
ImageIO.write(bufferedImg, "jpeg", os);
StreamedContent image= new DefaultStreamedContent(new ByteArrayInputStream(os.toByteArray()), "image/jpeg");
上一篇: 整理出来几个比较实用的代码对比工具
下一篇: MongoDB是什么?看完你就知道了!