public String base64Decoder(String str) {
BASE64Decoder decode = new BASE64Decoder();
String result = "";
byte[] b;
try {
b = decode.decodeBuffer(str);
result = new String(b,"utf-8");//切记此处千万不要用UTF-8
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
网友评论