commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [CODEC] Base64 vs. sun.misc.BASE64Decode
Date Sat, 19 Aug 2006 12:03:23 GMT
Selon Chris Hane <>:

>       char[] msgChars = new String(decoder.decode(b)).toCharArray();

This looks rather strange to me. When you decode something from Base64, you
expect the output to be (or contain in your case) pure binary data, you cannot
put it into a character array. When you do this, the JVM uses its default
character encoding setting and may well mangle your data. You should really
stick to bytes, not characters.

I'm not sure the problem is really here, though. It just looks strange to me.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message