public final class CommonMatchers extends Object
Commonly used TextMatcher
instances.
Each matcher returned are fresh instances that can safely be modified.
Modifier and Type | Field and Description |
---|---|
static String[] |
DOM_CONTENT_TYPES
Content types representing a document object model.
|
static String[] |
HTML_CONTENT_TYPES
HTML/XHTML content types.
|
static String[] |
IMAGE_IO_CONTENT_TYPES
Content types for natively supported Java ImageIO images.
|
static String[] |
XML_BASE_CONTENT_TYPES
Base content types for XML: "application/xml" and "text/xml".
|
static String[] |
XML_CONTENT_TYPES
HTML, XHTML, and XML-based content types.
|
static String[] |
XML_FEED_CONTENT_TYPES
ATOM, RDF, RSS, and strict XML content types.
|
Modifier and Type | Method and Description |
---|---|
static TextMatcher |
domContentTypes()
Matcher for common content-types defining a DOM document.
|
static TextMatcher |
htmlContentTypes()
Matcher for common content-types defining an HTML or XHTML document.
|
static TextMatcher |
imageIOStandardContentTypes()
Content types of standard image format supported by all Java ImageIO
implementations: JPEG, PNG, GIF, BMP, WBMP.
|
static TextMatcher |
xmlContentTypes()
Common content-types defining an XML document.
|
static TextMatcher |
xmlFeedContentTypes()
Matcher for common content-types defining an XML feed (RSS, Atom).
|
public static final String[] XML_BASE_CONTENT_TYPES
public static final String[] XML_FEED_CONTENT_TYPES
public static final String[] HTML_CONTENT_TYPES
public static final String[] XML_CONTENT_TYPES
public static final String[] DOM_CONTENT_TYPES
public static final String[] IMAGE_IO_CONTENT_TYPES
public static TextMatcher domContentTypes()
Matcher for common content-types defining a DOM document. That is, documents that are HTML, XHTML, or XML-based. The value has to be any of these to trigger a match (case-insensitive):
public static TextMatcher xmlFeedContentTypes()
Matcher for common content-types defining an XML feed (RSS, Atom). Because XML feeds are not always declaring their content type properly, this matcher will also match base XML content types. The value has to be any of these to trigger a match (case-insensitive):
public static TextMatcher htmlContentTypes()
Matcher for common content-types defining an HTML or XHTML document. The value has to be any of these to trigger a match (case-insensitive):
public static TextMatcher xmlContentTypes()
Common content-types defining an XML document. The value has to be any of these to trigger a match (case-insensitive):
public static TextMatcher imageIOStandardContentTypes()
Content types of standard image format supported by all Java ImageIO implementations: JPEG, PNG, GIF, BMP, WBMP. The value has to be any of these to trigger a match (case-insensitive):
Copyright © 2009–2023 Norconex Inc.. All rights reserved.