Saving an array of bytes to a file
Hi guys,
I'd like to save an array of bytes to a file. (It was initially a JPEG, but I resized it and now have an array of bytes.) How would I do the reverse transformation to save it to some new file? Which classes am I looking for?
Any advice is appreciated.
Re: Saving an array of bytes to a file
To save the byte to a file, see the following
Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)
If the bytes translate to an image, depending upon how the pixels are stored you can use ImageIO.write to save the image to File
ImageIO (Java Platform SE 6)
Re: Saving an array of bytes to a file
That's two of my problems you've solved, doWhile... Thank you very much!