把图片加载到BufferedImage中

把图片加载到BufferedImage 中有什么作用呢?它就可以利用

ImageIO.write(image, "JPEG", response.getOutputStream());

把图片打印到客户端,或者任何一个地方。

那么如何把图片加载到BufferedImage 中呢?

            String imgPath = addr;  
            BufferedImage image = ImageIO.read(new FileInputStream(imgPath));
原文地址:https://www.cnblogs.com/zhuxiaojie/p/4707503.html