Skip to content

解码base64

java
public static String b64decode(String b64encText) {
    String result = null;
    try {
        result = new String(javax.xml.bind.DatatypeConverter.parseBase64Binary(b64encText), "utf-8");
    } catch (java.io.UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    return result;
}

Released under the MIT License.