@ SuppressWarnings ( "unchecked" ) private static List < String > getResourcesFromJarOrZipFile ( final File jarOrZipFile , final Pattern searchPattern ) { final List < String > resources = new ArrayList <> ( ) ; try ( ZipFile zf = new ZipFile ( jarOrZipFile ) ; ) { final Enumeration < ZipEntry > e = ( Enumeration < ZipEntry > ) zf . entries ( ) ; while ( e . hasMoreElements ( ) ) { final ZipEntry ze = e . nextElement ( ) ; checkResource ( resources , searchPattern , ze . getName ( ) ) ; } } catch ( final IOException e ) { LOGGER . log ( FILE_UNREADABLE , e ) ; } return resources ; }
Browse the jar content to search resources that match the pattern .