개발자愛/JAVA
2007. 12. 21.
JAVA base64 incoding decoding
public static String base64Decode(String str) { String result = ""; try { sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder(); byte[] b1 = decoder.decodeBuffer(str); result = new String(b1); } catch (IOException ex) {} return result; } public static String base64Encode(String str) { String result = ""; sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder(); byte[] b1 = str.getBy..