How do I convert a InputStream to BufferedImage in

2019-04-03 09:00发布

问题:

Yes, I'm that stupid. I'm trying to stick some groovy code together from various cookbook recipes, and I can't get from an InputStream to BufferedImage in Java/Groovy. Google is not being my friend at present.

回答1:

BufferedImage imBuff = ImageIO.read(object.getInputStream());

Should work...