Code example for JarInputStream

0
    { 
       
        String s = "jar:"+__userURL+"TestData/test.zip!/subdir/";
        Resource r = Resource.newResource(s);
        InputStream is = r.getInputStream();        
        JarInputStream jin = new JarInputStream(is);
        assertNotNull(is);
        assertNotNull(jin);
         
    } 
 
    /* ------------------------------------------------------------ */ 
    public void testJarFileCopyToDirectoryTraversal () throws Exception 
    { 
        String s = "jar:"+__userURL+"TestData/extract.zip!/";
        Resource r = Resource.newResource(s);
 
        assertTrue(r instanceof JarResource);
        JarResource jarResource = (JarResource)r;
 
        File destParent = File.createTempFile("copyjar", null);