BASE64java 常用

来源:互联网 发布:ubuntu 安装 4k 对齐 编辑:程序博客网 时间:2024/06/07 01:22
 1   2   3   4   5   6   7   8   9
public static String base64Encode(String str){

return new BASE64Encoder().encode(str.getBytes());
}

public static String base64Decode(String str) throws IOException{

return new String(new BASE64Decoder().decodeBuffer(str));
}

//