This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
I need to convert a pdf file to its binary contents so I can send it as a message to an IBM MQ Series. How can i convert pdf to its binary contents in java? Is there other alternatives besides converting pdf to binary representation? String? Array of Strings? Anyone? Thanks
posted 12 years ago
The easiest way to do this is probably to read the contents of the file with a FileInputStream and then write the contents into a ByteArrayOutputStream. You can then put the ByteArray into your message. Kyle