boolean (String string) { // IANA doesn't specify a pattern for the subtype of example content // types but other subtypes seem to be one or more groups of // alphanumerics characters, the groups being separated by a single // period (.), hyphen (-) or plus (+) character // // Valid examples: // // "example/foo" // "example/foo.bar" // "example/foo-bar+baz" // "example/foo1.2006-bar" // // Invalid examples: // // "example/foo$bar" ($ isn't a valid separator) // "example/foo." (can't end with a separator) // if (m_recognizeExampleMediaType && string.matches(Holder.EXAMPLE_MIME_MEDIA_TYPE_PATTERN)) { return true; } return Holder.mimeTypes.contains(string); }