I have a byte array representation of a Image. How to save it on disk as an image file.
I have already done this
OutputStream out = new FileOutputStream("a.jpg");
out.write(byteArray);
out.flush();
out.close();
But when I open the image by double-clicking it, it doesn't show any image.