get the Extension of a file

@param res
@return extension of file
353241
public static String getExtension(Resource res, String defaultValue) {
	return getExtension(res.getName(), defaultValue);
    }
722536
public String getExtension(ProvFormat format) {
        String extension = UNKNOWN;
        if (format != null) {
            extension = extensionMap.get(format);
        }
        return extension;
    }
1272670
private static String getExtension(String fileName) {
        // play it safe and get rid of any fragment id
        // that might be there
        int length = fileName.length();

        int newEnd = fileName.lastIndexOf('#');
        if (newEnd == -1) {
            newEnd = length;
        }
        int i = fileName.lastIndexOf('.', newEnd);
        if (i != -1) {
            return fileName.substring(i + 1, newEnd);
        } else {
            // no extension, no content type
            return null;
        }
    }
394532
public static String getExtension(String fileName) {
    int pos = fileName.lastIndexOf('.');
    if (pos < 0) {
      return "";
    }
    return fileName.substring(pos + 1);
  }
1320104
public static String getFilenameExtension(String path) {
        if (path == null) return null;

        int extIndex = path.lastIndexOf(EXTENSION_SEPARATOR);
        if (extIndex == -1) return null;

        int folderIndex = path.lastIndexOf(FOLDER_SEPARATOR);
        if (folderIndex > extIndex) return null;

        return path.substring(extIndex + 1);
    }
28106
public java.lang.String getExtends() {
    java.lang.Object ref = extends_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        extends_ = s;
      }
      return s;
    }
  }
136484
public static byte[] getLocalByteArray(File res) {
		try {
			return toByteArray(new FileInputStream(res));
		} catch (FileNotFoundException e) {
			logger.error("FileNotFound", e);
		} 
		return null;
	}
10314
public static String getFileExtension(String value) {
        int index = value.lastIndexOf('.');
        if (index > -1) {
            return value.substring(index + 1);
        }

        return "";
    }
412768
public static String getFileExtension(String fullName) {
    checkNotNull(fullName);
    String fileName = new File(fullName).getName();
    int dotIndex = fileName.lastIndexOf('.');
    return (dotIndex == -1) ? "" : fileName.substring(dotIndex + 1);
  }
1001397
def get_file_extension(file_path):
    
    _ext = os.path.splitext(file_path)[-1]
    if _ext:
        return _ext[1:] if _ext.startswith('.') else _ext

    return ""
451710
public static String getExtension(String url) {
        url = TextUtils.isEmpty(url) ? "" : url.toLowerCase();
        String extension = MimeTypeMap.getFileExtensionFromUrl(url);
        return TextUtils.isEmpty(extension) ? "" : extension;
    }
275696
private static String getFileExtension(Resource file) {
	String name = file.getName();
	int index = name.lastIndexOf('.');
	if (index == -1) return null;
	return name.substring(index + 1).trim();
    }
1159485
public static String getExtension(String fileName){
        int dot = fileName.lastIndexOf('.');
        return dot==-1 ? null : fileName.substring(dot+1);
    }
1262478
function fileExtension(name, defaultValue) {
        if (defaultValue === void 0) { defaultValue = ""; }
        var extension = defaultValue;
        if (name) {
            var idx = name.lastIndexOf(".");
            if (idx > 0) {
                extension = name.substring(idx + 1, name.length).toLowerCase();
            }
        }
        return extension;
    }
73145
@Override
  public String getDescription() {
    String ucExt = extension.substring(1).toUpperCase();
    return (ucExt + " Files (*" + extension + ')');
  }
1227493
public String getExtension(File f) {
        if (f != null) {
            String filename = f.getName();
            int i = filename.lastIndexOf('.');
            if (i > 0 && i < filename.length() - 1) {
                return filename.substring(i + 1).toLowerCase();
            }
        }
        return null;
    }
37420
def get_file_extension(filename):
    
    filename_x = filename.split('.')
    if len(filename_x) > 1:
        if filename_x[-1].strip() is not '':
            return filename_x[-1]
    return None