When I try to create a java.util.zip.ZipFile
I get a java.util.zip.ZipException: error in opening zip file
. This exception only occurs when I try to open a large ZipFile
(> 2GB). Is there a trick to open big zip files?
Later I need to extract single files from this zip and I doubt that the ZipInputStream
is fast enough to extract the required files, since I need to run over all files.
Here is my StackTrace:
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:148)
at java.util.zip.ZipFile.<init>(ZipFile.java:162)
Update: I found out that it works on my desktop computer and it works if I open the ZipFile as a JUnit-Test within Android Studio, too (Since JUnit-Tests are run on the local desktop computer and not on the android device). However, I could not get it working on the android device. I guess the reason is the android file system.