I have a question related to retrieving files from mysql using JDBC, I managed to save a .png file from my desktop & retrieve it successfully, but I can't read the file, it shows that the format is unsupported (eventhoug I can open the original file without any issue).
Here's the code:
Any ideas what could be the cause and how to fix it?
Thank you in advance!
I'm having trouble understanding exactly what's happening. You have a PNG file in your mySQL DB. You can retrieve the Clob in the DB in Java. You can write the PNG file back to the disk in Java. But when you try to open the picture with some outside program, it says the PNG file is the wrong format? Is that correct?
All things are lawful, but not all things are profitable.