@Test public void testGetExtensionOnFilename() { final Object[][] testParameters = new Object[][] {{"HelloWorld.png", "png"}, {"Hello.World.jpg", "jpg"}, {"Hello_World.gif", "gif"}}; assertNull(FilenameUtils.getExtension(null)); for (final Object[] testParameter : testParameters) { String expected = (String) testParameter[1]; String filename = (String) testParameter[0]; assertEquals(expected, FilenameUtils.getExtension(filename)); } }
public static String getExtension(final String filename) { return getExtension(filename, false); }
FilenameUtils { public static String getExtension(final String filename) { return getExtension(filename, false); } }
FilenameUtils { public static String getExtension(final String filename) { return getExtension(filename, false); }  }
FilenameUtils { public static String getExtension(final String filename) { return getExtension(filename, false); }  static String getExtension(final String filename); static String getExtension(final String filename, final boolean isGreedy); static String stripExtension(final String filename); static String makeFilename(final String name, final String ext); }
FilenameUtils { public static String getExtension(final String filename) { return getExtension(filename, false); }  static String getExtension(final String filename); static String getExtension(final String filename, final boolean isGreedy); static String stripExtension(final String filename); static String makeFilename(final String name, final String ext);  }