Code example for JarFile

Methods: entriesclose

0
        Enumeration<JarEntry> enumeration = jarFile.entries();
        jarFile.close();
        try { 
            enumeration.hasMoreElements();
            fail("hasMoreElements() did not detect a closed jar file");
        } catch (IllegalStateException e) {
        } 
        Support_Resources.copyFile(resources, null, jarName);
        jarFile = new JarFile(new File(resources, jarName));
        enumeration = jarFile.entries();
        jarFile.close();
        try { 
            enumeration.nextElement();
            fail("nextElement() did not detect closed jar file");
        } catch (IllegalStateException e) {
        } 
    } 
 
    /** 
     * @throws IOException 
Stop searching for code, let great code find you!  Add Codota to your java IDE