Click here to Skip to main content
15,904,416 members

Comments by Manish_Mohan (Top 2 by date)

Manish_Mohan 7-Nov-12 5:54am View    
I tried all that.

i kept an "if" condition that the file will only be written in the HDD if the "bImageFromConvert" in not null.
but it is coming out to be null.

here is the code :

temp = rs.getBytes("FACE");

if (temp != null) {
InputStream in = new ByteArrayInputStream(temp);
BufferedImage bImageFromConvert = ImageIO.read(in);
if (bImageFromConvert != null) {
ImageIO.write(bImageFromConvert, "jpg", new File(
"E:\\face.jpg"));

JOptionPane.showMessageDialog(null, "image");
}
else
JOptionPane.showMessageDialog(null, "bImageFromConvert is null");
}
Manish_Mohan 7-Nov-12 5:48am View    
I am the using the same code.

but i'm getting the buffered image as null.