Code example for ZipEntry

Methods: getSize

        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 =;
        assertEquals("Must not be able to read directory data", -1, data);
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "IllegalStateException checking.", 
        method = "getEntry", 
        args = {java.lang.String.class}
Connect your IDE to all the code out there  Get Codota for Java