code: @Nullable
    public String getPrimaryExtensionOfMimeType (@Nullable final IMimeType aMimeType)
    {
      final ICommonsList <MimeTypeInfo> aInfos = getAllInfosOfMimeType (aMimeType);
      if (aInfos != null)
        for (final MimeTypeInfo aInfo : aInfos)
        {
          // Not every info has an extension!
          final String ret = aInfo.getPrimaryExtension ();
          if (ret != null)
            return ret;
        }
      return null;
    }
docs: Get the primary (=first) extension for the specified mime type.
  
  @param aMimeType
  The mime type to be searched. May be <code>null</code>.
  @return <code>null</code> if the mime type has no file extension assigned