1. 編碼格式 是 string 和 byte 之間的格式:
String s1 = Base64.encode("中".getBytes("utf-8"));
System.out.println(s1);
byte[] b2 = Base64.decode(s1);
String s2 = new String(b2,"UTF-8");
System.out.println(s2);
2. 差別
3. 總結
1. 編碼格式 是 string 和 byte 之間的格式:
String s1 = Base64.encode("中".getBytes("utf-8"));
System.out.println(s1);
byte[] b2 = Base64.decode(s1);
String s2 = new String(b2,"UTF-8");
System.out.println(s2);
2. 差別
3. 總結