Code example for Enumeration

Methods: nextElement

0
            fail("nextElement() did not detect closed jar file");
        } catch (IllegalStateException e) {
        } 
    } 
 
    /** 
     * @throws IOException 
     * java.util.jar.JarFile#getJarEntry(java.lang.String) 
     */ 
    public void test_getEntryLjava_lang_String() throws IOException { 
        try { 
            Support_Resources.copyFile(resources, null, jarName);
            JarFile jarFile = new JarFile(new File(resources, jarName));
            assertEquals("Error in returned entry", 311, jarFile.getEntry(
                    entryName).getSize());
            jarFile.close();
        } catch (Exception e) {
            fail("Exception during test: " + e.toString());
        } 
 
        Support_Resources.copyFile(resources, null, jarName);