Java代码
import javaioIOException;
public class test {
/**
* 编码
* @param bstr
* @return String
*/
public static String encode(byte[] bstr){
return new sunmiscBASEEncoder()encode(bstr);
}
/**
* 解码
* @param str
* @return string
*/
public static byte[] decode(String str){
byte[] bt = null;
try {
sunmiscBASEDecoder decoder = new sunmiscBASEDecoder();
bt = decoderdecodeBuffer( str );
} catch (IOException e) {
eprintStackTrace();
}
return bt;
}
/**
* @param args
*/
public static void main(String[] args) {
test te = new test();
String aa = 更多更多;
aa = teencode(aagetBytes());
Systemoutprintln(aa:+aa);
String str = aa;
String str = new String(tedecode(str));
Systemoutprintln(str:+str);
}
}