/** * Obtains the file extension of the specified <code>File</code>. The extension is considered to be all the * characters after the last occurrence of {@link Constants#FILE_EXTENSION_SEPARATOR_CHAR} in the pathname * of the input. * @param theFile the file whose extension is being requested * @return the extension or <code>null</code> if not found * @since 4.2 */ public static String getExtension(File theFile) { return getExtension(theFile.getPath()); }
/** * Obtains the file extension of the specified <code>File</code>. The extension is considered to be all the * characters after the last occurrence of {@link Constants#FILE_EXTENSION_SEPARATOR_CHAR} in the pathname * of the input. * @param theFile the file whose extension is being requested * @return the extension or <code>null</code> if not found * @since 4.2 */ public static String getExtension(File theFile) { return getExtension(theFile.getPath()); }
String ext = FileUtils.getExtension(file); if (ext == null) { System.err.println(fullName + " is not a vdb or xml file."); //$NON-NLS-1$