1
import sun.misc.BASE64Decoder;
public static String getFromBASE64(String s) {
2
if (s == null) return null;
3
BASE64Decoder decoder = new BASE64Decoder();
4
try {
5
byte[] b = decoder.decodeBuffer(s);
6
return new String(b);
7
} catch (Exception e) {
8
return null;
9
}
10
}
11
public static String getBASE64(String s) {
12
if (s == null) return null;
13
return (new sun.misc.BASE64Encoder()).encode( s.getBytes() );
14
}
15

import sun.misc.BASE64Decoder;
public static String getFromBASE64(String s) {
2

3

4

5

6

7

8

9

10

11

12

13

14

15
