Code example for JarFile

Methods: close, getManifest

0
 
    @Override 
    protected void setUp() { 
        resources = Support_Resources.createTempFolder();
        try { 
            Support_Resources.copyFile(resources, null, jarName);
            JarFile jarFile = new JarFile(new File(resources, jarName));
            m = jarFile.getManifest();
            jarFile.close();
            Support_Resources.copyFile(resources, null, attJarName);
            jarFile = new JarFile(new File(resources, attJarName));
            m2 = jarFile.getManifest();
            jarFile.close();
        } catch (Exception e) {
            fail("Exception during setup: " + e.toString());
        } 
    } 
 
    private Manifest getManifest(String fileName) {
        try { 
            Support_Resources.copyFile(resources, null, fileName);