primefaces p:graphicImage 流的用法
程序员文章站
2022-07-11 11:59:54
...
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");
上一篇: JAP2.1 效率优化
下一篇: JPA的视图查询(转)