Returns true if there is an engine registered for the content type or content type suffix.

@param contentTypeOrSuffix
@return true if there is an engine for the content type
14731
public boolean hasContentTypeEngine(String contentTypeOrSuffix) {
        String sanitizedTypes = sanitizeContentTypes(contentTypeOrSuffix);
        String[] types = sanitizedTypes.split(",");
        for (String type : types) {
            if (engines.containsKey(type)) {
                return true;
            }
        }

        return suffixes.containsKey(contentTypeOrSuffix.toLowerCase());
    }
898755
public function isImageType($contentType)
    {
        if (strpos($contentType, '.') !== false) {
            $ext = pathinfo($contentType, PATHINFO_EXTENSION);
            if (in_array($ext, ['gif', 'jpe', 'jpeg', 'jpg'])) {
                return true;
            }
        } else {
            if ($pos = strpos($contentType, '/')) {
                $contentType = substr($contentType, 0, $pos);
            }
            if ($contentType === 'image') {
                return true;
            }
        }
        return false;
    }
853776
@Override
	public boolean containsValidPrefix(final String key) {
		if (key != null) {
			lock.readLock().lock();
			try {
				for (final String aPrefix : prefixes) {
					if (key.equals(aPrefix) || key.startsWith(aPrefix + getPrefixDelimiter())) {
						return true;
					}
				}
			} finally {
				lock.readLock().unlock();
			}
		}
		return false;
	}
1304641
public void setContentType(String contentType)
  {
    _contentType = contentType;

    if (_contentType.equals("text/xml"))
      _strategy = XML;
    if (_contentType.equals("application/xml"))
      _strategy = XML;
    else if (_contentType.equals("text/xhtml"))
      _strategy = XHTML;
    else if (_contentType.equals("application/xhtml+xml"))
      _strategy = XHTML;
    else if (_contentType.equals("text/html"))
      _strategy = HTML;
    else
      _strategy = XML;
  }
350313
public static boolean isPrefixOf(URI prefix, URI uri) {
		if (prefix.scheme() == null || !prefix.scheme().equals(uri.scheme()))
			return false;
		String[] prefixSeg = prefix.segments();
		String[] uriSeg = uri.segments();
		if (prefixSeg.length == 0 || uriSeg.length == 0)
			return false;
		if (!prefix.hasTrailingPathSeparator())
			return false;
		if (uriSeg.length < prefixSeg.length - 1)
			return false;
		for (int i = 0; i < prefixSeg.length - 1; i++)
			if (!uriSeg[i].equals(prefixSeg[i]))
				return false;
		return true;
	}
482337
@Override
    public boolean isFileExtensionRegistered(String fileTypeExtension) throws OSException {
        try {
            getFileExtension(fileTypeExtension);
            return true;
        } catch (OSException e) {
            return false;
        }
    }
119493
public static void checkContentResourceType(NodeType contentNodeType) throws NoSuchNodeTypeException
   {
      if (!contentNodeType.isNodeType(WebDavConst.NodeTypes.NT_RESOURCE))
      {
         throw new NoSuchNodeTypeException("Content-Node type " + contentNodeType.getName()
            + " must extend nt:resource.");
      }
   }
610058
static public function contentTypeToSuffix($contentType)
    {
        $types = self::byContentType();
        return isset($types[$contentType]) ? $types[$contentType]['suffix'] : null;
    }
749049
public static boolean isJBossRepositoryClassLoader(ClassLoader loader)
   {
      Class<?> clazz = loader.getClass();
      while (!clazz.getName().startsWith("java"))
      {
         if ("org.jboss.mx.loading.RepositoryClassLoader".equals(clazz.getName()))
            return true;
         clazz = clazz.getSuperclass();
      }

      return false;
   }
1182164
@Override
    public ContentSerializer getContentSerializerForContentType(String contentType) {
        for (ContentSerializer renderer : serializers) {
            if (renderer.getContentType().equals(contentType)) {
                return renderer;
            }
        }
        LoggerFactory.getLogger(this.getClass()).info("Cannot find a content renderer handling " + contentType);
        return null;
    }
536314
private boolean containsFunctionType(List<String> resourceTypes) {

        if (resourceTypes.contains(CmsXmlDynamicFunctionHandler.TYPE_FUNCTION)) {
            return true;
        }
        if (resourceTypes.contains(CmsResourceTypeFunctionConfig.TYPE_NAME)) {
            return true;
        }
        return false;
    }
838742
def match_content_types_for(content_types, type)
      content_types.detect do |content_type, _|
        content_type.is_a?(Regexp) ? type.match(content_type) : type == content_type
      end
    end
286683
public static boolean isTypesProxyable(Iterable<? extends Type> types, ServiceRegistry services) {
        return getUnproxyableTypesException(types, services) == null;
    }
196841
private boolean isDomainExcludedFromProxy(String domainName) {
        if (domainName == null || domainName.isEmpty()) {
            return false;
        }

        for (DomainMatcher excludedDomain : proxyExcludedDomainsEnabled) {
            if (excludedDomain.matches(domainName)) {
                return true;
            }
        }
        return false;
    }
665258
public function supports(string $contentType): bool
    {
        foreach (array_keys($this->types) as $pattern) {
            $pattern = str_replace(['*', '.', '/', '+'], ['(.*)', '.', '\/', '\+'], $pattern);
            if (preg_match("#^$pattern$#i", $contentType) > 0) {
                return true;
            }
        }
        return false;
    }
968861
boolean matchSourcePropertyType(String destination) {
    for (Tokens tokens: propertyNameInfo.getSourcePropertyTypeTokens())
      for (String token: tokens)
        if (token.equalsIgnoreCase(destination))
          return true;
    return false;
  }
969684
public static boolean hasExtension(String extension) {
        if (extension == null || extension.length() == 0) {
            return false;
        }
        return extensionToMimeTypeMap.containsKey(extension);
    }