`
shuzheng5201314
  • 浏览: 198583 次
  • 来自: 北京
社区版块
存档分类
最新评论

BufferedImage to InputStream

阅读更多
URL url = new URL("http://www.google.com/intl/en_ALL/images/logo.gif");
BufferedImage image = ImageIO.read(url);
ByteArrayOutputStream os = new ByteArrayOutputStream();
ImageIO.write(image, "gif", os);
InputStream is = new ByteArrayInputStream(os.toByteArray());

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics