1833861 Members
2411 Online
110063 Solutions
New Discussion

Re: Java Zip Problems

 
Shaun Lovick
New Member

Java Zip Problems

We are using the java.util.zip package to retrieve a large number of images from a zip file (e.g. zip all the images for a day). This works fine with zip files up to approximately 200 MB, however, with a 500 MB file we can retrieve all of the entries. Also, on Windows, we were able to access a zip file over 1 GB successfully. Has anyone noticed similar behavior on HP?

Thanks,
Shaun
3 REPLIES 3
Shaun Lovick
New Member

Re: Java Zip Problems

Sorry - typo in the original post. I should have said that we cannot access all of the entries in a zip file if it is over 500 MB. A quick code snippet is below.

File file = new File(archiveFile);
ZipFile zipFile = new ZipFile(file);
ZipEntry entry = zipFile.getEntry(imageEntry);

The result on large files is a null entry on entries that occur later in the zip file.
harry d brown jr
Honored Contributor

Re: Java Zip Problems


Shaun,

""This works fine with zip files up to approximately 200 MB, however, with a 500 MB file we can retrieve all of the entries.""

are you saying that only a 200mb file works but a 500MB doesn't, and that a 1Gb file is OK, in windows?

And you are asking if HP behaves like windows?

One thing you do need for hpux, is the latest zip patches.

live free or die
harry

Live Free or Die
harry d brown jr
Honored Contributor

Re: Java Zip Problems


Ah, now it's clear!

Ok, one thing with java is to make sure you are upto date in patches: java.patches(http://www.hp.com/products1/unix/java/infolibrary/patches.html)

live free or die
harry
Live Free or Die