Here you can find the source of Base64(String msg)
public static String Base64(String msg)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import sun.misc.BASE64Decoder; public class Main { public static String Base64(String msg) { BASE64Decoder decoder = new BASE64Decoder(); byte[] byteData = null; String clearText = ""; try {//from w w w .j a v a 2 s. co m byteData = decoder.decodeBuffer(msg); clearText = new String(byteData); } catch (IOException e) { e.printStackTrace(); } return clearText; } }