public static String getMimeType(String fileExtension)
    {
        int idx = fileExtension.lastIndexOf('.');
        if (idx != -1)
        {
            fileExtension = fileExtension.substring(idx+1);
        }
        String type = mimeTable.get(fileExtension.toLowerCase());
        if (type != null)
        {
            return type;
        }
        return DEFAULT;
    }
public static String getMimeType ( String fileExtension ) { int idx = fileExtension . lastIndexOf ( '.' ) ; if ( idx != - 1 ) { fileExtension = fileExtension . substring ( idx + 1 ) ; } String type = mimeTable . get ( fileExtension . toLowerCase ( ) ) ; if ( type != null ) { return type ; } return DEFAULT ; }
@return Returns MIME TYPE for filename extension. Returns null if extension is unknown.
<p>If fileExtension contains '.' only right  part of string is used.
@param fileExtension File extension. Extension for file README.txt is 'txt'