作为使用GWT的Base64我如何连接code /德code短字符串?
问题描述:
我要带code很短的字符串作为GWT基地64日code服务器上的底座64串。任何人都有这个工具类或库?
I need to encode a short String as base 64 in GWT and decode the base 64 string on the server. Anyone have utility class or library for this?
答
您可以在客户端上的所有浏览器都使用本地JavaScript这除了IE以外≤9.在服务器上可以使用的one 的。
You can use native JavaScript for this on the client on all browsers except IE ≤ 9. On the server you can use one of the official classes.
的Java / GWT:
Java/GWT:
private static native String b64decode(String a) /*-{
return window.atob(a);
}-*/;
恩code是 BTOA
。