Code example for JarOutputStream

Methods: close

0
                e.printStackTrace();
            } 
        } 
        try { 
            if (out != null) {
                out.close();
            } 
        } catch (IOException e) {
            e.printStackTrace();
        } 
        file.delete();
    } 
 
    // Test verbose, quiet and log file options. 
    public void testLoggingOptions() throws Exception { 
        // test default option, which is quiet (no output at all) 
        in = Archive.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
        file = File.createTempFile("logtest", ".jar");
        file.deleteOnExit();
        out = new JarOutputStream(new FileOutputStream(file));