Actually the commons-codec
version and specific Sun internal version you are using do give the same results. I think you thought they were giving different versions because you are implicitly calling toString()
on an array when you do:
System.out.println(org.apache.commons.codec.binary.Base64.encodeBase64(baos.toByteArray()))
Read full article from serialization - Howto base64 encode an java object using org.apache.commons.codec.binary.base64? - Stack Overflow
No comments:
Post a Comment