Class CommonMatchers
Commonly used TextMatcher instances.
Each matcher returned are fresh instances that can safely be modified.
As of 3.0.0, content type constants are immutable Set
instances as opposed to arrays.
-
Field Summary
FieldsModifier and TypeFieldDescriptionContent types representing a document object model:HTML/XHTML content types:Content types for natively supported Java ImageIO images.Base content types for XML: "application/xml" and "text/xml".HTML, XHTML, and XML-based content types:ATOM, RDF, RSS, and strict XML content types: -
Method Summary
Modifier and TypeMethodDescriptionstatic TextMatcherall()Matches all content types.static TextMatcherMatcher for common content-types defining a DOM document.static TextMatcherMatcher for common content-types defining an HTML or XHTML document.static TextMatcherContent types of standard image format supported by all Java ImageIO implementations: JPEG, PNG, GIF, BMP, WBMP.static TextMatcherCommon content-types defining an XML document.static TextMatcherMatcher for common content-types defining an XML feed (RSS, Atom).
-
Field Details
-
XML_BASE_CONTENT_TYPES
Base content types for XML: "application/xml" and "text/xml".
-
XML_FEED_CONTENT_TYPES
ATOM, RDF, RSS, and strict XML content types:
- application/atom+xml
- application/rdf+xml
- application/rss+xml
- application/xml
- text/xml
-
HTML_CONTENT_TYPES
HTML/XHTML content types:
- application/vnd.wap.xhtml+xml
- application/xhtml+xml
- text/html
-
XML_CONTENT_TYPES
HTML, XHTML, and XML-based content types:
- application/atom+xml
- application/mathml+xml
- application/rss+xml
- application/xhtml+xml
- application/xml
- application/xslt+xml
- image/svg+xml
- text/xml
-
DOM_CONTENT_TYPES
Content types representing a document object model:
- application/atom+xml
- application/mathml+xml
- application/rss+xml
- application/vnd.wap.xhtml+xml
- application/x-asp
- application/xhtml+xml
- application/xml
- application/xslt+xml
- image/svg+xml
- text/html
- text/xml
-
IMAGE_IO_CONTENT_TYPES
Content types for natively supported Java ImageIO images.
- image/bmp
- image/gif
- image/jpeg
- image/png
- image/vnd.wap.wbmp
- image/x-windows-bmp
-
-
Method Details
-
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):
DOM_CONTENT_TYPES- Returns:
- text matcher
-
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):
XML_FEED_CONTENT_TYPES- Returns:
- text matcher
-
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):
HTML_CONTENT_TYPES- Returns:
- text matcher
-
xmlContentTypes
Common content-types defining an XML document. The value has to be any of these to trigger a match (case-insensitive):
XML_CONTENT_TYPES- Returns:
- text matcher
-
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):
IMAGE_IO_CONTENT_TYPES- Returns:
- text matcher
-
all
Matches all content types.
- Returns:
- text matcher
-