@Test public void testHasExtensionEmptyFilename() { assertEquals(false, FileUtil.hasExtension("", "ext")); }
public static boolean hasExtension(String filename, String extension) { if (Util.isBlank(extension)) { return false; } String fileExtension = getExtension(filename); if (Util.isBlank(fileExtension)) { return false; } return fileExtension.equalsIgnoreCase(extension.replace(".", "")); }
FileUtil { public static boolean hasExtension(String filename, String extension) { if (Util.isBlank(extension)) { return false; } String fileExtension = getExtension(filename); if (Util.isBlank(fileExtension)) { return false; } return fileExtension.equalsIgnoreCase(extension.replace(".", "")); } }
FileUtil { public static boolean hasExtension(String filename, String extension) { if (Util.isBlank(extension)) { return false; } String fileExtension = getExtension(filename); if (Util.isBlank(fileExtension)) { return false; } return fileExtension.equalsIgnoreCase(extension.replace(".", "")); }  }
FileUtil { public static boolean hasExtension(String filename, String extension) { if (Util.isBlank(extension)) { return false; } String fileExtension = getExtension(filename); if (Util.isBlank(fileExtension)) { return false; } return fileExtension.equalsIgnoreCase(extension.replace(".", "")); }  static String stripExtension(String filename); static String getExtension(String filename); static boolean hasExtension(String filename, String extension); }
FileUtil { public static boolean hasExtension(String filename, String extension) { if (Util.isBlank(extension)) { return false; } String fileExtension = getExtension(filename); if (Util.isBlank(fileExtension)) { return false; } return fileExtension.equalsIgnoreCase(extension.replace(".", "")); }  static String stripExtension(String filename); static String getExtension(String filename); static boolean hasExtension(String filename, String extension);  }