private void processFilePath ( File file ) { try { if ( file . getCanonicalPath ( ) . toLowerCase ( ) . endsWith ( ".jar" ) || file . getCanonicalPath ( ) . toLowerCase ( ) . endsWith ( ".zip" ) ) { ZipFile zip = new ZipFile ( file ) ; Enumeration < ? extends ZipEntry > entries = zip . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = entries . nextElement ( ) ; if ( entry . getName ( ) . endsWith ( "class" ) ) { InputStream zin = zip . getInputStream ( entry ) ; tryClass ( entry . getName ( ) . replace ( File . separatorChar , ' ' ) . substring ( 0 , entry . getName ( ) . length ( ) - 6 ) ) ; zin . close ( ) ; } } } } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
Finds and processes property files inside zip or jar files .