public static MimeType fromFile(final File file){
  final String fileName=file.getName();
  final MimeType mimeType=fromFileName(fileName);
  return mimeType;
}

public static MimeType fromFile ( final File file ) { final String fileName = file . getName ( ) ; final MimeType mimeType = fromFileName ( fileName ) ; return mimeType ; }
this method returns the mime - type extrapolated from the file .
