Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I decompress a string in java?

user10878887May 22 2011 — edited May 23 2011
The string is compressed with zip and is encoded base64.
I decocoded the string, I copied the string to a zip file and I tryed to decompress using the sample script(class UnZip2) from here: http://java.sun.com/developer/technicalArticles/Programming/compression/.
The error is
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at UnZip2.main(UnZip2.java:12)


Decompression works with other archives.
I know the string is ok because the server where I send it makes a succesful decompression.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2011
Added on May 22 2011
3 comments
422 views