List of utility methods to do Is Jar File
boolean | isJarFile(File jar) is Jar File return jar.getName().endsWith(".jar"); |
boolean | isJar(File file) Test if a file looks like it contains a Jar try { new JarFile(file); return true; } catch (Exception e) { return false; |
boolean | isJarFile(File f) is Jar File if (f != null) { if (f.getName().contains(".jar") || f.getAbsolutePath().contains(".jar")) { return true; return false; |
boolean | isJar(final File element) is Jar return (element.isFile() && element.getName().endsWith(JAR_SUFFIX));
|
boolean | isJarFile(File file) Returns true if the given file is a jar file and false otherwise. return file.isFile() && file.getName().toLowerCase().endsWith(JAR_EXTENSION);
|
boolean | isJar(File file) Is the file a JAR? try { JarFile jarFile = new JarFile(file); jarFile.close(); return true; } catch (IOException e) { return false; |
boolean | isJar(File file) is Jar return existsWithExtension(file, ".jar"); |
boolean | isJar(InputStream is) Check if this inputstream is a jar/zip try { JarInputStream jis = new JarInputStream(is); if (jis.getNextEntry() != null) { return true; } catch (IOException ioe) { return false; ... |
boolean | isJar(String file) is Jar try { JarFile jar = new JarFile(file); JarEntry entry = jar.getJarEntry("META-INF/MANIFEST.MF"); jar.close(); return entry != null; } catch (IOException e) { return false; |