private static String getMimeType(FileType fileType) {
    if (fileType instanceof LanguageFileType) {
      String[] mimeTypes = ((LanguageFileType)fileType).getLanguage().getMimeTypes();
      if (mimeTypes.length > 0) return mimeTypes[0];
    }
    String typeName = fileType.getName();
    if (OS_MIME_TYPES.containsKey(typeName)) {
      return OS_MIME_TYPES.get(typeName);
    }
    String fromName = StringUtil.toLowerCase(typeName);
    fromName = TYPE_PREFIX + fromName.replace(" ", "-");
    return fromName;
  }
private static String getMimeType(FileType fileType)