https://issues.apache.org/bugzilla/show_bug.cgi?id=44679
Tim Funk <[EMAIL PROTECTED]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #22 from Tim Funk <[EMAIL PROTECTED]> 2008-10-10 09:25:07 PST ---
simple wrappers to strip = and \n (tweak to accurately use your own
BASE64Encoder class)
public static String decodeBase64(String s) {
switch(s.length()%4) {
case 3:
s+= "==="; break;
case 2:
s+= "=="; break;
case 1:
s+= "="; break;
default:
}
return new BASE64Encoder().decode(s.getBytes())););
}
public static String encodeBase64(String s) {
String encoded = BASE64Encoder().encode(s.getBytes())));
return encoded.replaceAll("[\n=]", "");
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]