Creating image from byte array
807606May 28 2007 — edited May 28 2007Hi,
I am storing an image as BLOB into database and then reading it as byte array and trying to convert it to an image ( get back the original image). I am using the following code. But when I print the image object, it prints null.
BufferedImage image = ImageIO.read( new ByteArrayInputStream( imageBuf ) );
Can I not store an image simply as a byte array and then get the image back from that byte array?