Code example for JarOutputStream

Methods: close

0
                e.printStackTrace();
            } 
        } 
        try { 
            if (out != null) {
                out.close();
            } 
        } catch (IOException e) {
            e.printStackTrace();
        } 
        file.delete();
    } 
 
    public void testJustResources() throws Exception { 
        in = Segment.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/JustResources.pack");
        file = File.createTempFile("just", "resources.jar");
        out = new JarOutputStream(new FileOutputStream(file));
        Segment segment = new Segment();
        segment.unpack(in, out);
    }