How do I get a raw input stream of the message content?

John Zukowski

The getInputStream() method returns the content based upon the Content-Transfer-Encoding header. Prior to the 1.2 API, there was no easy way to get the raw content. The 1.2 version of the API introduces the getRawInputStream() method to get the raw form of the content from the MimeMessage or MimeBodyPart class.