/** * Returns the file type of a file, i.e. it's extension. * * @param file the file * @return the file type of the file, e.g. ".class", ".jar" or "" if the * file name does not contain an extension. */ public static String getFileType(File file) { return getFileType(file.getName()); }