6/5/2019

Octet Stream Base64

37
Octet Stream Base64 Average ratng: 5,0/5 635 votes

Nov 23, 2018 - Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64.

Octet Stream Error

Octet Stream Base64
Hi,
I need to create a MultiPart Message where the Content-Type for one of the parts will be 'application/octet-stream' and its Content-Transfer-Encoding will be 'base64'. Here's what im looking for:
I've tried a couple of things to get this working, first i decided to just add the headers myself in the MimeBodyPart like so:
But the result of this is that my headers are disregarded and the setText() method sets the Content-Type to plain text and the Encoding to 7 bit. I confirmed the headers are actually being set to the 'base64' and 'application/octet-stream' by commenting out the setText() but once i put in the setText() method it overrides my desired settings.
The other thing i tried was to set the Content-Type within the DataHandler Object like so:
But this always results in :
I saw the javadoc for MailcapCommandMap and i found the 'mailcap.default' file in my activation.jar and it already has the 'application/octet-stream' value in it. So to make a long story short, i need some help.