JDK-6370714 : Open a zip file from within a jar file
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2006-01-10
  • Updated: 2011-02-16
  • Resolved: 2006-01-10
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
I would like to open a set of zip'd sound bites from within a jar file. I would need a ZipFile constructor that accepts a ZipEntry of another zip'd file.

zf = new ZipFile("foo.jar");
ze = zf.getEntry("SoundBite.zip");

zf2 = new ZipFile( ze );   //<- No constructor for ZipFile(ZipEntry ze)!
ze2 = zf2.getEntry("Horn.wav");
is =  zf2.getInputStream( ze2 );

JUSTIFICATION :
So far, the only way to do this process is to extract the internal zipfile, and temporarly store the file somewhere. This uses extra Time. It also uses extra storage.  And then u have to still open the zip'd file of sound bites.

Comments
EVALUATION This issue is captured in 4648386; that bug also encompasses other issues such as having a jar file's manifest specify jars that are within a jar.
10-01-2006