public Enumeration < ? extends ZipEntry > entries ( ) { ensureOpen ( ) ; return new Enumeration < ZipEntry > ( ) { private int i = 0 ; public boolean hasMoreElements ( ) { synchronized ( ZipFile . this ) { ensureOpen ( ) ; return i < total ; } } public ZipEntry nextElement ( ) throws NoSuchElementException { synchronized ( ZipFile . this ) { ensureOpen ( ) ; if ( i >= total ) { throw new NoSuchElementException ( ) ; } long jzentry = getNextEntry ( jzfile , i ++ ) ; if ( jzentry == 0 ) { String message ; if ( closeRequested ) { message = "ZipFile concurrently closed" ; } else { message = getZipMessage ( ZipFile . this . jzfile ) ; } throw new ZipError ( "jzentry == 0" + ",\n jzfile = " + ZipFile . this . jzfile + ",\n total = " + ZipFile . this . total + ",\n name = " + ZipFile . this . name + ",\n i = " + i + ",\n message = " + message ) ; } ZipEntry ze = getZipEntry ( null , jzentry ) ; freeEntry ( jzfile , jzentry ) ; return ze ; } } } ; }
Returns an enumeration of the ZIP file entries .