code: public static String getMimeType(String url)
  	{
  	    String type = null;
  	    String extension = MimeTypeMap.getFileExtensionFromUrl(url);
  	    if (extension != null) {
  	        MimeTypeMap mime = MimeTypeMap.getSingleton();
  	        type = mime.getMimeTypeFromExtension(extension);
  	    }
  	    return type;
  	}
docs: Get the MIME type of a file
  @param url
  @return