protected static String guessContentTypeFromName(String fname)
public static String guessContentTypeFromName(String fname)
  protected static String guessContentTypeFromName(String fname)  {    int dot = fname.lastIndexOf (".");        if (dot != -1)      {	if (dot == fname.length())	  return ("application/octet-stream");	else	  fname = fname.substring (dot + 1);      }        String type = MimeTypes.getMimeTypeFromExtension (fname);        if (type == null)      return("application/octet-stream");    return(type);  }