标签:java
String s = "Base64是网络上最常见的用于传输8Bit字节代码的编码方式之一"; byte[] b = s.getBytes("UTF-8"); byte[] out = java.util.Base64.getEncoder().encode(b); System.out.println(new String(out)); out = java.util.Base64.getMimeEncoder().encode(b); System.out.println(new String(out)); out = java.util.Base64.getUrlEncoder().encode(b); System.out.println(new String(out));
标签:java
原文地址:http://blog.csdn.net/yanliang1/article/details/43240703