20140819bug

    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);
    }

20140819bug

时间: 2024-10-13 06:04:03

20140819bug的相关文章