Returns true if the given MIME type has an entry in the map.

@param mimeType A MIME type (i.e. text/plain)
@return True iff there is a mimeType entry in the map.
541217
public static boolean hasMimeType(String mimeType) {
        if (mimeType == null || mimeType.length() == 0) {
            return false;
        }
        return mimeTypeToExtensionMap.containsKey(mimeType);
    }
1344017
public Boolean checkType(String type) {
    if (mtasPositionType == null) {
      return false;
    } else {
      return mtasPositionType.equals(type);
    }
  }
251027
public static boolean isIntCategory(ClassNode type) {
        return  type==byte_TYPE     ||  type==char_TYPE     ||
                type==int_TYPE      ||  type==short_TYPE;
    }
436649
private boolean isContentTypeIn(ZipInputStream stream) throws IOException {
		boolean isContentType = false;
		if (this.innerFile != null) {
			final String strInner = this.innerFile.toString();
			InputStream dataStream = null;
			ZipEntry zipEntry = stream.getNextEntry();
			while (zipEntry != null && dataStream == null) {
				if (strInner.equals(zipEntry.getName())) {
					dataStream = stream;
				} else {
					zipEntry = stream.getNextEntry();
				}
			}
			if (dataStream != null) {
				isContentType = isContentType(stream, zipEntry, dataStream);
			}
		} else {
			isContentType = isContentType(stream, null, null);
		}
		return isContentType;
	}
1319980
protected function checkMimeType($mimeType)
    {
        $allow = $this->getWhitelistedMimeTypes();
        $block = $this->getBlacklistedMimeTypes();

        if (false !== $allow) {
            foreach ($allow as $pattern) {
                if ($this->wildCardMatch($mimeType, $pattern)) {
                    return true;
                }
            }

            return false;
        }

        if (false !== $block) {
            foreach ($block as $pattern) {
                if ($this->wildCardMatch($mimeType, $pattern)) {
                    return false;
                }
            }
        }

        return true;
    }
614141
public static boolean isValidMediaType(final String mediaType) {
    return (mediaType != null) && MEDIA_TYPES.values().contains(mediaType.toLowerCase());
  }
694267
@Override
    public boolean accepts(String mimeType) {
        String contentType = request.headers().get(HeaderNames.ACCEPT);
        if (contentType == null) {
            contentType = MimeTypes.HTML;
        }
        // For performance reason, we first try a full match:
        if (contentType.contains(mimeType)) {
            return true;
        }
        // Else check the media types:
        MediaType input = MediaType.parse(mimeType);
        for (MediaType type : mediaTypes()) {
            if (input.is(type)) {
                return true;
            }
        }
        return false;
    }
821176
public boolean isType(final org.efaps.admin.datamodel.Type _type)
    {
        return getType().equals(_type);
    }
822075
public void setMimeType(MimeType mimeType) {
        if (mimeType != null) {
            getState().mimeType = mimeType.getMimeType();
        } else {
            getState().mimeType = null;
        }
    }
617266
function hasTextMimetype(types) {
      if (!types) return true;
      for (var i = 0; i < types.length; i++) {
        if (types[i] === 'Text' || types[i] === 'text/plain') return true;
      }
      return false;
    }
988675
private static ParseResults parseMimeType(String mimeType) {
        String[] parts = mimeType.split(";");
        ParseResults results = new ParseResults();
        results.params = new HashMap<>();

        for (int i = 1; i < parts.length; ++i) {
            String p = parts[i];
            String[] subParts = p.split("=");
            if (subParts.length == 2) {
                results.params.put(subParts[0].trim(), subParts[1].trim());
            }
        }
        String fullType = parts[0].trim();

        // Java URLConnection class sends an Accept header that includes a
        // single "*" - Turn it into a legal wildcard.
        if (fullType.equals("*")) {
            fullType = "*/*";
        }

        int slashIndex = fullType.indexOf('/');
        if (slashIndex != -1) {
            results.type = fullType.substring(0, slashIndex);
            results.subType = fullType.substring(slashIndex + 1);
        } else {
            //If the type is invalid, attempt to turn into a wildcard
            results.type = fullType;
            results.subType = "*";
        }

        return results;
    }
804869
public boolean supportsMimeType (@Nullable final IMimeType aMimeType)
  {
    if (aMimeType == null)
      return false;
    return getQValueOfMimeType (aMimeType).isAboveMinimumQuality ();
  }
1042633
public void addMimeType(String mimeType) {
		if (!Strings.isEmpty(mimeType)) {
			for (final String mtype : mimeType.split("[:;,]")) { //$NON-NLS-1$
				this.mimeTypes.add(mtype);
			}
		}
	}
1044615
public function MapMimeTypeToExtension($extension, $mime_type)
    {
        if (!isset($this->extension_to_mime_types[$extension])) {
            $this->extension_to_mime_types[$extension] = array($mime_type);
        } else {
            $this->extension_to_mime_types[$extension][] = $mime_stype;
        }

        return true;
    }
264137
public void addMimeMapping(String extension, String type) {
        _mimeMap.put(StringUtils.asciiToLowerCase(extension), normalizeMimeType(type));
    }
1343212
private function checkMimeTypeSupported($mimeType)
    {
        foreach ($this->supportedMimeTypes as $supportedMimeType) {
            if (fnmatch($supportedMimeType, $mimeType)) {
                return true;
            }
        }

        return false;
    }
680899
public static boolean isJavaConstantType(TypeMirror type)
    {
        switch (type.getKind())
        {
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
                return true;
            case DECLARED:
                DeclaredType dt = (DeclaredType) type;
                TypeElement te = (TypeElement) dt.asElement();
                return "java.lang.String".contentEquals(te.getQualifiedName());
            default:
                return false;
        }
    }