Code example for ZipEntry

Methods: getSize

0
        zentry = zfile.getEntry("testdir1");
        assertNotNull("Must be able to obtain ZipEntry: testdir1", zentry);
        in = zfile.getInputStream(zentry);
        /* 
         * Android delivers empty InputStream, RI no InputStream at all. The 
         * spec doesn't clarify this, so we need to deal with both situations. 
         */ 
        int data = -1;
        if (in != null) {
            data = in.read();
            in.close();
        } 
        assertEquals("Must not be able to read directory data", -1, data);
    } 
 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "IllegalStateException checking.", 
        method = "getEntry", 
        args = {java.lang.String.class}
    )