public class Base64Test {
public static void main(String[] args) throws IOException {
String str = "my string";
String s = new BASE64Encoder().encode(str.getBytes("UTF-8"));
byte[] bytes = new BASE64Decoder().decodeBuffer(s);
String result = new String(bytes, "UTF-8");
System.out.println(result);
}
}
byte[] bytes = new BASE64Decoder().decodeBuffer(s);
String result = new String(bytes, "UTF-8");
System.out.println(result);
}
}
No comments :
Post a Comment