From a DB2 table I\'ve got blob which I\'m converting to a byte array so I can work with it. I need to take the byte array and create a PDF out of it.
PDF
This
Sending your output through a FileWriter is corrupting it because the data is bytes, and FileWriters are for writing characters. All you need is:
FileWriter
OutputStream out = new FileOutputStream("out.pdf"); out.write(bArray); out.close();