FileUtils { public static String getAppendix(final File f) { final String fileName = f.getName(); int indexOfLastDot = fileName.lastIndexOf(DOT); if (indexOfLastDot < 0) { return null; } return fileName.substring(indexOfLastDot + DOT.length()); }  static void mkdirs(final File f); static void deleteDirectory(final File directory); static String getDelta(File parent, File child); static String getRelativePath(String targetPath, String basePath, String pathSeparator); static boolean isSymbolicLink(File file); static void createSymbolicLink(final File source, final File target); static boolean isChild(File parent, File child); static String ensureLeadingSlash(final String path); static String getAppendix(final File f);  }
@Test public void testFileAppendix() { assertEquals("zip", FileUtils.getAppendix(new File("MyFile.zip"))); }
@Test public void testNoFileAppendix() { assertNull(FileUtils.getAppendix(new File("MyFile"))); }