List of utility methods to do File Extension Name Extract
String | getFileExtension(File file) Utility method that gets the extension of a file from its name if it has one try { return getFileExtension(file.getCanonicalPath()); } catch (IOException e) { return ""; |
String | getFileExtension(File file) Gets the file extension as a string. String fileName = file.getName(); return (fileName.lastIndexOf(".") == -1) ? "" : fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()); |
String | getFileExtension(File file) get File Extension return getFileExtension(file.getPath());
|
String | getFileExtension(File file, boolean includeDelimiter) Return the extension part given file name. String result = ""; if (file != null) { String absoluteName = file.getAbsolutePath(); if (absoluteName != null) { int delimIndex = absoluteName.lastIndexOf("."); if (delimIndex != -1) { if (!includeDelimiter) { delimIndex++; ... |
String | getFileExtension(File fx) get File Extension String path = null; try { path = fx.getCanonicalPath(); } catch (IOException e1) { path = fx.getAbsolutePath(); return getFileExtension(path); |
String | getFileExtension(File path) get File Extension if (path == null) return null; return getFileNameExtension(path.getName()); |
String | getFileExtension(final String fileName) Identifies the file extension for a given file name and returns the extension part, or an empty string if the file has no extension. return getFileExtension(File.separatorChar, fileName);
|
String | getFileExtension(final String filenamePath) Retourniert Dateiendung (mit Punkt). String filename = getFilename(filenamePath); if (filename.lastIndexOf(".") > 0) { return filename.substring(filename.lastIndexOf("."), filename.length()); return ""; |
String | getFileExtension(String filename) get File Extension String extension = ""; int index = filename.lastIndexOf('.'); if (index != -1) extension = filename.substring(index); return extension; |
String | getFileExtension(String fileName) Returns file's extention. String ext = null; if (fileName.lastIndexOf(".") > 0 && fileName.lastIndexOf(".") < fileName.length()) { ext = fileName.substring(fileName.lastIndexOf(".") + 1); return ext; |