标签:style blog color ar 2014 div 代码 amp
public static String encryptBASE64(byte[] key){ return (new BASE64Encoder()).encodeBuffer(key); //return (new BASE64Encoder()).encode(key); }
上面代码产生的字符串带有换行符“\r\n” ,与其他字符拼接时会产生换行的字符串(多行)
/share_page3.htm?invited=ovLzEwLjUwLj
&invitedname=R0cDovLzEwLjUwLjExNS4
应该为(一行):
/share_page3.htm?invited=ovLzEwLjUwLj&invitedname=R0cDovLzEwLjUwLjExNS4
解决方法:
public static String encryptBASE64(byte[] key){ return (new BASE64Encoder()).encode(key); }
标签:style blog color ar 2014 div 代码 amp
原文地址:http://www.cnblogs.com/muzhongjiang/p/3922386.html