Nov 15

Java includes an undocumented class, sun.misc.BASE64Decoder, for handling Base64 decoding. The following gives an example of its usage.


String encoded = getEncodedStringFromSomewhere();

// Create encoder

BASE64Decoder decoder = new BASE64Decoder();

// Decode encoded string into original byte array

byte[] decoded = decoder = decoder.decodeBuffer(encoded);

written by objects \\ tags: , ,


Leave a Reply

You must be logged in to post a comment.