clemen 0 Report post Posted February 21, 2005 Hi,Is there a Base64 method from J2SE 1.4 API that can decode and encode a string?TIA. Share this post Link to post Share on other sites
bjrn 0 Report post Posted February 22, 2005 I read a claim that there was a method in java.util.prefs, but otherwise it seems like people have just gone and made their own classes and/or methods. I've also head that there is an undocumented method called sun.misc.BASE64Encoder.encode. Anyway, if you want some Base64 encoding/decoding I suggest you either make your own class to handle it, or download any of the ones you find by googling for java base64. Share this post Link to post Share on other sites
acidrain 0 Report post Posted September 6, 2005 Use Commons Codec from Apache Site http://commons.apache.org/proper/commons-codec/in package org.apache.commons.codec.binarythere is one class Base64use static method :* decodeBase64(byte[] base64Data) * encodeBase64(byte[] binaryData)* and be careful it works in array of bytes not String* so beware of character encoding for Converting between your String to array of bytes.Hopes this help you. Share this post Link to post Share on other sites