public static boolean isZip ( String fileName ) { if ( fileName == null ) { return false ; } String tl = fileName . toLowerCase ( ) ; for ( String element : ZIP_EXTENSIONS ) { if ( tl . endsWith ( element ) ) { return true ; } } return false ; }
Determines if the file has an extension known to be a ZIP file currently this includes . zip . jar . war . ear . aar