commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Sterpu <vic...@casnt.ro>
Subject [codec] Base 64 problem
Date Tue, 24 May 2011 16:11:50 GMT
I'm trying to use org.apache.commons.codec.binary.Base64 to code in 
base64 a zip file but the result is not as expected.
The code used to encode is
String content = new 
String(Base64.encodeBase64(FileUtils.readFileToString(new 
File("FARMD_16611264_20110524_1102.xml.zip")).getBytes()));
The result is "Base64 content 1".
The result that I must obtain is "Base64 content 2" and this second 
string is generated using this online encoder 
http://www.opinionatedgeek.com/dotnet/tools/base64encode/.
I tryed all day to fix this but I can't figure it out.
Please give me an ideea about what is going on.
I attached the zip file that I try to encode.

Thank you.

Base64 content 1: 
UEsDBBQAAAAIAGlY77+9Pu+/ve+/vR7vv70GCAAA77+9DAAAIAAAAEZBUk1EXzE2NjExMjY0XzIwMTEwNTI0XzExMDIueG1s77+9Vm9UU++/vRnvv70mN0Eg77+9LBxAOu+/vSXvv70QNe+/vXsTCO+/vQTvv70BSmoISAh4au+/vV5vLu+/ve+/ve+/ve+/vXDvv70NLO+/ve+/vWhZK++/ve+/vdmH77+9dQ5x77+9Z++/vTvvv73vv73vv706FRUd77+9zbVU77+9W13vv70dde+/ve+/ve+/ve+/vRV6au+/ve+/ve+/vQ0B77+977+977+977+977+977+9cu+/ve+/vXnvv73vv73vv73vv73vv715X0BY77+977+9MmFFd3Xvv71n77+9WO+/ve+/vS/vv716Bu+/ve+/ve+/vWEY77+9Cu+/vWct77+9QhEH77+977+91Jwr77+9F++/ve+/ve+/ve+/ve+/vUvLv++/ve+/vRLvv70g77+9PGfWkDrvv70hGO+/ve+/ve+/vSzvv70xawJS77+977+9WFNe77+977+9WO+/ve+/ve+/vVbvv70j77+9WEYg77+9DCFQfl7vv70o77+9ITbvv73vv70JD++/vTECJSED77+977+977+9NDVy77+977+9CO+/ve+/vWXvv71WWe+/vWvvv73vv70KYlPvv71BB3RGE++/vSsyElrvv70s0YNC77+9Ae+/ve+/vWbvv70W77+9FxgU77+977+977+977+9CghDQ++/vVso77+9R++/vUHvv73vv71JE1Xvv73vv70wZg0l77+977+977+9V0M077+9Ik1577+977+977+977+977+9JhNJGkwFGu+/ve+/vTlJ77+9aO+/ve+/vUNtIUAZYEEsJwYE77+977+977+9aj4gQn/vv73FqXU0aO+/vemksO+/vQpK77+9agRHCwrvv70GGEjvv73vv71JVQLvv71RF2gB77+977+9cTfvv71zKiMM77+9Fxjvv70WWO+/vQQJ77+977+977+9EB0t77+977+9cVJe77+977+977+9BmBg77+977+9VO+/ve+/ve+/ve+/vQZe77+977+9Ue+/ve+/ve+/vSNhOu+/vQRONGtaJMm/Wu+/ve+/ve+/ve+/ve+/ve+/vRwl77+9BF4v77+9AVYP77+977+9QO+/vQjvv700Nu+/vRhD77+977+9CCwDI2zvv71wWjQE77+9RzkM77+9LO+/ve+/vXNK77+977+977+916wB77+977+9UAhiLO+/vShh77+9VATvv70C77+9MBQfEGgEDe+/vVESCwHbvu+/ve+/ve+/ve+/vSHvv71K77+977+9DhPvv73vv70RBxrvv73vv71SHu+/vRcl77+9RlIs77+9WO+/ve+/vUllRTHvv73crxYY77+977+9RyLvv73vv73vv73vv70R77+977+977+9Bu+/vU7vv71KOO+/vTxXF2Hvv70Y77+9MO+/ve+/vQAM77+9Jg3vv71I77+977+977+9M++/vXVBK++DqSJz77+9THlFRkPvv71m77+977+9Ge+/vRVnOmjvv73vv73vv70Vae+/vT3vv73vv70QAu+/ve+/vWbvv715Me+/vT8V77+9LFli77+9dQzkmYMFFgIdAO+/vTPvv73vv71EJjrvv71IAe+/vU5LTQDvv73vv70AAO+/ve+/vQUoTmLvv70g77+9aUQsSRTvv70TWO+/vTIYJ++/vWrvv73vv73vv73vv70Z77+977+9Pu+/vVEt77+9Ky7vv70Q24J1Ai/vv70077+9ZWjvv73vv73vv73vv70h77+9dmoOeUkE77+9P3oqGmzvv73vv70Z77+90Lfvv73vv73vv73vv708KHnvv70ZQu+/vVXvv73vv73vv73vv71abVw7D++/ve+/vQfvv71577+977+9Y++/vd+z77+9UQTvv73vv73vv73vv70I77+9W++/ve+/vXte77+9F1bvv73vv73vv71yDQgr77+977+977+9Ze+/vUzvv71AKBUZflzvv71077+977+977+977+9Tybvv70E77+93IUr1bLvv71aMg3vv70iIVHvv73vv71mBO+/vWl777+9QX4bLEXvv70kdc6M77+977+9EO+/ve+/vWwzy7gJ77+977+977+9eilRJO+/vTN+77+9B++/vW9lJu+/vSQcW++/vSQL77+977+977+9USgaYkQQxrLvv71j77+9BllI77+9V++/ve+/vQQ4HVHvv71ScO+/vQkHQ++/vSTvv70M77+9Ru+/vQrvv73vv711NkdlA1FTWWHvv71a77+977+9UWFr77+9Ve+/ve+/vc+Keh3vv73vv73vv73Xue+/vUp777+9AyLvv73vv705G++/ve+/ve+/vULvv70AFTrvv71SKSLvv71IDSAiRe+/vRZVehnvv73vv71aBTjvv70s77+9eCnvv70RBmHvv71tAVIN0pBP77+9OhEY77+9Ru+/vXvvv70CI++/vQUy77+9Uu+/vU7vv73vv73vv70JFO+/ve+/vSLvv71s77+977+977+9ZC5Y77+9LO+/ve+/vUNGIy4C77+977+9Ze+/vWrvv70uMwBx77+9Iu+/vQpC77+9Yjvvv70p77+977+9H8SB77+9M++/vVAobu+/ve+/ve+/vTU177+977+977+9LO+/ve+/vcSR77+977+9K++/ve+/ve+/ve+/vR9b77+9d3Tvv73vv71577+9a++/vWvvv70u77+977+9Ne+/ve+/ve+/ve+/vRt7bC0PH9uz77+977+977+9e3zvv73vv73vv73vv73vv73vv71p77+9Ze+/vUNnK++/vX/vv71idOe5ie+/vVXvv73vv73vv73vv73vv73vv73vv73vv70zK0/vv73vv719fzLLgD3vv73vv73vv73vv71/77+977+977+977+977+977+977+977+9Ll47eHrvv73Ume+/vQ0h77+9XyLvv71jcdiB77+977+9H++/vWUvA++/vXLvv71KJe+/ve+/vXgM77+977+977+9Mu+/vWRGBlh3Zu+/vQHvv71p0a9D77+9Iu+/vR4O77+9Au+/vWJz77+9GDbvv73vv71AHEhBUirvv71w77+9DB8ALO+/ve+/ve+/ve+/ve+/vdau77+977+9O++/ve+/vXvvv71n77+977+9Ne+/ve+/ve+/ve+/vQFuZx7vv73vv71f77+9CzNY77+977+977+977+90p3vv71eODvvv73vv73vv73vv70NcEjvv73vv71F77+977+9QQ5K77+977+9Z++/ve+/vR8uSDlJfO+/ve+/ve+/ve+/vU7vv73vv70rT++/ve+/vS9sSAbvv73vv73vv71O77+977+9YDsoUybvv73vv71wLDRc77+9YXLvv70H2plKZVhGbu+/vVM3V2hkVUVW77+9IChRKu+/vR7vv71h77+977+977+977+9HxDvv73vv714aAjvv73vv73vv73vv73Rvu+/ve+/vdCh77+90ZPvv73vv73vv71377+9bWYfde+/ve+/vR3vv73vv711U++/vQ1977+977+9WR3vv73vv73vv71V77+977+9Bznvv73vv71XWe+/ve+/ve+/ve+/vUjvv71ONO+/ve+/ve+/vXYefuGlhV7vv70177+9WO+/ve+/ve+/vdSiQu+/ve+/vWpQ1Zfvv71M77+977+9GS5K77+977+977+9HlIt77+9Z++/vUFEO++/vTZI77+977+977+9fe+/ve+/vTbvv718FHAZ77+9FjpK77+9XBYTWDbvv73vv73vv70S77+9YQzvv71r77+9LXzvv71+Pu+/ve+/ve+/ve+/ve+/vVfvv70fD15hPjDvv70xPe+/ve+/vXJ5d0/vv73vv73vv70tJ964eGTvv73vv73zpoSx77+9W23vv717B++/ve+/vXVW77+977+977+9O++/vUpbNRsHJyY977+977+977+977+9fu+/ve+/ve+/vX9x77+9W++/ve+/ve+/ve+/vTnvv73vv73Ehe+/ve+/ve+/ve+/vU1byobvv73vv73Wu++/ve+/vXpZUQrvv73vv70uH3Bc77+9ce+/vWzLqt6RNyfvv70/d++/ve+/vd6/77+9b3hk77+9Qu+/vTvvv73vv73vv70P77+977+977+9Mm7vv73vv70Px4vvv73vv71X77+977+9dGZn77+977+9Su+/ve+/vVXvv73vv73vv73vv73vv73vv70e77+977+9Pu+/vXTvv71XPlXvv70NVO+/vXfvv73vv73vv73vv73vv73vv70I77+9Mhs777+9b++/vXvvv71P77+977+977+977+9P++/vRg5Ju+/ve+/vTjvv73vv70YHeKHru+/ve+/ve+/vV3vv73vv71S77+9RO+/vUdT77+9f++/ve+/ve+/ve+/ve+/vdqE77+977+9AXVT77+9VO+/vVvvv71T77+977+977+977+9VO+/vTrvv70kGe+/ve+/ve+/vU3vv70E77+977+9DTrvv73vv73vv73vv73vv708WO+/vW8/PO+/vRUU77+977+9f1N277+9enRn77+977+9dxsX77+977+9R++/ve+/ve+/ve+/vQs577+9Ennvv73vv73vv73Tiu+/vV/vv71v77+977+977+9Du+/vS9877+9GO+/vSfvv73vv73Rpj3vv73vv73fix/vv71v77+977+977+9Re+/ve+/vWsJ77+9V++/vde+77+9Uu+/vW3vv71bH++/ve+/vT/vv71077+977+9dwsk77+977+9V3bvv70dGis7Vu+/ve+/vW7vv73vv71V77+9HGN977+977+94o63fX/vv73vv70D1609L++/vX/vv73vv71C14Lvv71L77+9A1BLAQItABQAAAAIAGlY77+9Pu+/ve+/vR7vv70GCAAA77+9DAAAIAAAAAAAAAAAAAAAAAAAAAAARkFSTURfMTY2MTEyNjRfMjAxMTA1MjRfMTEwMi54bWxQSwUGAAAAAAEAAQBOAAAARAgAAAAA



Base64 content 2: 
UEsDBBQAAAAIAGlYuD7VwR6FBggAAJwMAAAgAAAARkFSTURfMTY2MTEyNjRfMjAxMTA1MjRfMTEwMi54bWy9Vm9UU+cZ5yY3QSCALBxAOuYl6hA1yXsTCKAEjAFKaghICHhqrV5vLuHS5N5w7w0ss+yQaFkr3ebZh651DnGuZ7U7h7K5OhUVHdLNtVSPW12pHXXt6p/a6o4Vemq7sfcNAYKu9ezL+HLz/Hmf5/f8nud5X0BY9bwyYUV3dfdnyVi8rC+segaqnpJhGJkKkmctmEIRB8L41Jwr1hfG/4mH8Y9Ly7/j8xLtjCCyPGfWkDqgIRiO5t0s5zFrAlKztlhTXpacWJqr1VaxI/tYRiDcDCFQfl6QKIEhNtbYCQ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