code: public static String getExtensionFromMimeType(String mimeType) {
          if (mimeType == null || mimeType.length() == 0) {
              return null;
          }
          return mimeTypeToExtensionMap.get(mimeType);
      }
docs: Returns the registered extension for the given MIME type. Note that some
  MIME types map to multiple extensions. This call will return the most
  common extension for the given MIME type.
  
  @param mimeType A MIME type (i.e. text/plain)
  @return The extension for the given MIME type or null iff there is none.