I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.
If You are prefering performance based solution then you can use "MiGBase64"
http://migbase64.sourceforge.net/
public class Base64Test {
public static void main(String[] args) {
String encodeToString = Base64.encodeToString("JavaTips.net".getBytes(), true);
System.out.println("encodeToString " + encodeToString);
byte[] decodedBytes = Base64.decode(encodeToString.getBytes());
System.out.println("decodedBytes " + new String(decodedBytes));
}
}