Return the associated quality of the given MIME type using the fallback
mechanism.

@param aMimeType
The charset name to query. May not be <code>null</code>.
@return The {@link QValue} of the mime type
773554
@Nonnull
  public QValue getQValueOfMimeType (@Nonnull final IMimeType aMimeType)
  {
    ValueEnforcer.notNull (aMimeType, "MimeType");

    // Extract only the real MIME type, without any parameters!
    final IMimeType aRealMimeType = aMimeType.getCopyWithoutParameters ();

    QValue aQuality = m_aMap.get (aRealMimeType);
    if (aQuality == null)
    {
      // Check for "contenttype/*"
      aQuality = m_aMap.get (aRealMimeType.getContentType ().buildMimeType ("*"));
      if (aQuality == null)
      {
        // If not explicitly given, check for "*"
        aQuality = m_aMap.get (AcceptMimeTypeHandler.ANY_MIMETYPE);
        if (aQuality == null)
        {
          // Neither charset nor "*" nor "*/*" is present
          return QValue.MIN_QVALUE;
        }
      }
    }
    return aQuality;
  }
1159181
@Nonnull
  public CSP2SourceList addMimeType (@Nonnull final IMimeType aMimeType)
  {
    ValueEnforcer.notNull (aMimeType, "aMimeType");
    m_aList.add (aMimeType.getAsString ());
    return this;
  }
59789
def mimetype(self, value: str) -> None:
        """"""
        if (
                value.startswith('text/') or value == 'application/xml' or
                (value.startswith('application/') and value.endswith('+xml'))
        ):
            mimetype = f"{value}; charset={self.charset}"
        else:
            mimetype = value
        self.headers['Content-Type'] = mimetype
213910
public com.google.api.ads.admanager.axis.v201805.MimeType getMimeType() {
        return mimeType;
    }
1298242
public static String getMimeType(Resource res, String defaultValue) {
	return IOUtil.getMimeType(res, defaultValue);
    }
1294714
@Nonnull
  public QValue getQValueOfEncoding (@Nonnull final String sEncoding)
  {
    ValueEnforcer.notNull (sEncoding, "Encoding");

    // Direct search encoding
    QValue aQuality = m_aMap.get (_unify (sEncoding));
    if (aQuality == null)
    {
      // If not explicitly given, check for "*"
      aQuality = m_aMap.get (AcceptEncodingHandler.ANY_ENCODING);
      if (aQuality == null)
      {
        // Neither encoding nor "*" is present
        // -> assume minimum quality
        return QValue.MIN_QVALUE;
      }
    }
    return aQuality;
  }
28067
public String getDefaultReturnValue(HashMap<String,TypeMirror> typeBinding)
    {
        String returnType = getReturnType(typeBinding);
        if (_defaultReturnValues.containsKey(returnType))
            return _defaultReturnValues.get(returnType);
        return "null";
    }
720100
public String getMimeType()
   {
      if (mediaType == null || untrustedAgent)
      {
         return mimeTypeResolver.getMimeType(fileName);
      }

      return mediaType.getType() + "/" + mediaType.getSubtype();
   }
856424
public static String getMimeType(Resource resource) {
    if (isNtResource(resource)) {
      return resource.getValueMap().get(JcrConstants.JCR_MIMETYPE, String.class);
    }
    else if (isNtFile(resource)) {
      return getMimeType(resource.getChild(JcrConstants.JCR_CONTENT));
    }
    return null;
  }
391622
public static MimeType getMimeType(String value) {
        if (StringUtils.isNotBlank(value)) {
            try {
                return getMimeTypes().forName(value);
            } catch (MimeTypeException e) {
                MediaType mediaType = getMediaType(null, value);
                if (mediaType != null) {
                    try {
                        return getMimeTypes().forName(mediaType.toString());
                    } catch (MimeTypeException e1) {
                        // detection not successful
                    }
                }
            }
        }
        return null;
    }
573756
function qualityValue( $mimeType )
    {
        if ( isset( $this->QualityValueMapOverride[$mimeType] ) )
            return $this->QualityValueMapOverride[$mimeType]['value'];
        else if ( isset( $this->QualityValueMap[$mimeType] ) )
            return $this->QualityValueMap[$mimeType]['value'];
        return false;
    }
1343719
@OverrideOnDemand
  @Nullable
  protected String determineMimeType (@Nonnull final String sFilename, @Nonnull final IReadableResource aResource)
  {
    return MimeTypeInfoManager.getDefaultInstance ().getPrimaryMimeTypeStringForFilename (sFilename);
  }
366150
public synchronized static Mimetypes getInstance() {
        if (mimetypes != null) return mimetypes;

        mimetypes = new Mimetypes();
        InputStream is = mimetypes.getClass().getResourceAsStream("/mime.types");
        if (is != null) {
            if (log.isDebugEnabled()) {
                log.debug("Loading mime types from file in the classpath: mime.types");
            }
            try {
                mimetypes.loadAndReplaceMimetypes(is);
            } catch (IOException e) {
                if (log.isErrorEnabled()) {
                    log.error("Failed to load mime types from file in the classpath: mime.types", e);
                }
            } finally {
                try { is.close(); } catch (IOException ex) { log.debug("", ex); }
            }
        } else {
            if (log.isWarnEnabled()) {
                log.warn("Unable to find 'mime.types' file in classpath");
            }
        }
        return mimetypes;
    }
1139015
public Set<String> getMimeTypes() throws OSException {
        // lazy initialization
        if (mimeTypes == null) {
            mimeTypes = new HashSet<>();

            for (String path : MIME_TYPE_LISTS) {
                File mimeListFile = new File(path);
                if (mimeListFile.isFile() && mimeListFile.canRead()) {
                    try (BufferedReader br = new BufferedReader(new FileReader(mimeListFile))) {
                        for (String line; (line = br.readLine()) != null;) {
                            line = line.replaceAll("\\s+", "");
                            if (MIME_PATTERN.matcher(line).matches()) {
                                mimeTypes.add(line);
                            }
                        }
                    } catch (IOException e) {
                        throw new OSException(e);
                    }
                }
            }
        }
        return Collections.unmodifiableSet(mimeTypes);
    }
803607
public boolean explicitlySupportsMimeType (@Nullable final IMimeType aMimeType)
  {
    if (aMimeType == null)
      return false;
    final QValue aQuality = m_aMap.get (aMimeType);
    return aQuality != null && aQuality.isAboveMinimumQuality ();
  }
1332954
@Nullable
  @ReturnsMutableCopy
  public ICommonsList <MimeTypeInfo> getAllInfosOfMimeType (@Nullable final IMimeType aMimeType)
  {
    if (aMimeType == null)
      return null;

    final ICommonsList <MimeTypeInfo> ret = m_aRWLock.readLocked ( () -> m_aMapMimeType.get (aMimeType));

    // Create a copy if present
    return ret == null ? null : ret.getClone ();
  }
252174
@Nonnull
  public QValue getQValueOfLanguage (@Nonnull final String sLanguage)
  {
    ValueEnforcer.notNull (sLanguage, "Language");

    // Find language direct
    QValue aQuality = m_aMap.get (_unify (sLanguage));
    if (aQuality == null)
    {
      // If not explicitly given, check for "*"
      aQuality = m_aMap.get (AcceptLanguageHandler.ANY_LANGUAGE);
      if (aQuality == null)
      {
        // Neither language nor "*" is present
        // -> assume minimum quality
        return QValue.MIN_QVALUE;
      }
    }
    return aQuality;
  }