Code example for ZipEntry

Methods: getCrc, getName, setTime

0
        } catch (IOException ee) {
            // expected 
        } 
    } 
 
    /** 
     * @tests java.util.zip.ZipOutputStream#finish() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "ZipException can not be checked.", 
        method = "finish", 
        args = {} 
    ) 
    public void test_finish() throws Exception { 
        ZipEntry ze = new ZipEntry("test");
        zos.putNextEntry(ze);
        zos.write("Hello World".getBytes());
        zos.finish();
        assertEquals("Finish failed to closeCurrentEntry", 11, ze.getSize());