Lines Matching defs:matchAgainst
284 * Returns true if the given mimeType matches the matchAgainst specification. The comparison
285 * ignores case and the matchAgainst string may include "*" for a wildcard (e.g. "image/*").
288 * @param matchAgainst A MIME type to check against. May include wildcards.
291 public static boolean mimeTypeMatches(String mimeType, String matchAgainst) {
292 Pattern p = Pattern.compile(matchAgainst.replaceAll("\\*", "\\.\\*"),
298 * Returns true if the given mimeType matches any of the matchAgainst specifications. The
299 * comparison ignores case and the matchAgainst strings may include "*" for a wildcard
303 * @param matchAgainst An array of MIME types to check against. May include wildcards.
304 * @return true if the mimeType matches any of the matchAgainst strings
306 public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) {
307 for (String matchType : matchAgainst) {