code: public static String fileExtensionForMIMEType(String mimeType) {
          loadMappings();
  
          String ext = mimeTypeToExtensionMap.get(mimeType);
  
          if (ext == null) ext = "dat";
  
          return ext;
      }
docs: Get an appropriate extension for a MIME type.
  
  @param mimeType
  the String MIME type
  @return the appropriate file name extension, or a default extension if
  not found. The extension will not have the leading "." character.