Code example for JarEntry

Methods: getAttributes

        Support_Resources.copyFile(resources, null, "Broken_manifest.jar");
        try { 
            attrJar = new JarFile(new File(resources, "Broken_manifest.jar"));
            jarEntry = attrJar.getJarEntry("META-INF/");
            fail("IOException expected");
        } catch (IOException e) {
            // expected. 
    public void test_ConstructorLjava_lang_String() { 
        assertNotNull("Jar file is null", jarFile);
        zipEntry = jarFile.getEntry(entryName);
        assertNotNull("Zip entry is null", zipEntry);
        jarEntry = new JarEntry(entryName);
        assertNotNull("Jar entry is null", jarEntry);
        assertEquals("Wrong entry constructed--wrong name", entryName, jarEntry
Connect your IDE to all the code out there  Get Codota for Java