02-22-2009 10:08 AM
have anybody of you ever tried to write some code, that can extract a ZIP file which is containing multiple files? I am asking since in the JavaWorld this is quite a simple task (by using ZipFile (or ZipInputStream) and ZipEntry)...
Now I wanted to do the same in my BB Application - and I realize now, that there is no equivalent to ZipEntry... and the provided GZInputStream & ZLibInputStream are "just" able to handle single files [but not archives includeing folder].
So my question is, is there somebody who tried ever to extract a ZIP on BB with RIM's API? And if so would you mind to help me... or even better is there some sort of LIB (jar) that can be already used?
Solved! Go to Solution.
02-22-2009 02:46 PM
of course not - since 'LZW' != 'G' :-)
but even when I GZIP a archive on a solaris (with multiple files) I run into the same problem - GZipStream does not support Entries... and that's what I am looking fore a pure RIM Java (or MEJava) impl. that is able to handle archives - or of course somebody who did this before.
02-22-2009 02:49 PM
To get ideas about that - you can check source code of Java 2 Standard Edition.
When you have downloaded and installed J2SE SDK there is a file src.zip
It is a source code of java libraries.
Unzip this file and investigate the relevant classes.
02-22-2009 03:02 PM
thanks for the hint - it was also my (natural) first thought - I even went back to my first JDK I ever worked with (JDK 1.1.3) - but even there the core access [like getNextEntry()] to ZIP's are native methods - so with that there is not much, that I could check (learn/c&p)...
So what I am looking for is really a pure Java impl...
03-03-2009 04:09 AM
just for the records (if somebody else is searching for this) - there is a GNU zipME lib:
04-14-2010 12:40 PM - edited 04-14-2010 12:40 PM
It worked for me once I made the post (over a year ago) - I have no information what have happen in the meantime (if there had been any changes that would explain why this does not work anymore)
04-14-2010 02:33 PM
I have recently been testing ZipMe and believe that there is a flaw in the decompression whenever the compressed file is larger than one of its internal blocks. So it works for small files (say < 2K), but not for large files (say > 10K).
I have only been looking at decompression, not compression.
Is this the problem you are seeing?
As far as I can tell, ZipMe has not been touched in the last year.
02-21-2012 10:48 AM