public static MimeType fromFileName(final String fileName){
  final String inLowerCaseName=fileName.toLowerCase();
  final String fileExtension=getFileExtension(inLowerCaseName);
  final MimeType mimeType=fileExtensions.get(fileExtension);
  if (mimeType != null) {
    return mimeType;
  }
  return BINARY;
}

public static MimeType fromFileName ( final String fileName ) { final String inLowerCaseName = fileName . toLowerCase ( ) ; final String fileExtension = getFileExtension ( inLowerCaseName ) ; final MimeType mimeType = fileExtensions . get ( fileExtension ) ; if ( mimeType != null ) { return mimeType ; } return BINARY ; }
this method returns the mime - type extrapolated from the file name .
