import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.IOException;
import java.io.InputStream;
public static byte[] getDecode64(String str){
try{
return new BASE64Decoder().decodeBuffer(str);
}catch(IOException ioe){
logger.error(ioe);
return null;
}
} public static String getEncode64(byte by[]){
if(by==null) return null;
return new BASE64Encoder().encode(by);
}
import sun.misc.BASE64Encoder;
import java.io.IOException;
import java.io.InputStream;
public static byte[] getDecode64(String str){
try{
return new BASE64Decoder().decodeBuffer(str);
}catch(IOException ioe){
logger.error(ioe);
return null;
}
} public static String getEncode64(byte by[]){
if(by==null) return null;
return new BASE64Encoder().encode(by);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货