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());
Pollination by Honey Bees
3 weeks ago
1 comments:
Thanks! This was just the code I needed to return a dynamic image to struts 2 stream type.
Post a Comment