public class BodyContentHandler extends ContentHandlerDecorator
Modifier and Type | Field and Description |
---|---|
private static Matcher |
MATCHER
The XPath matcher used to select the XHTML body contents.
|
private static XPathParser |
PARSER
XHTML XPath parser.
|
Constructor and Description |
---|
BodyContentHandler()
Creates a content handler that writes XHTML body character events to
an internal string buffer.
|
BodyContentHandler(org.xml.sax.ContentHandler handler)
Creates a content handler that passes all XHTML body events to the
given underlying content handler.
|
BodyContentHandler(int writeLimit)
Creates a content handler that writes XHTML body character events to
an internal string buffer.
|
BodyContentHandler(java.io.OutputStream stream)
Creates a content handler that writes XHTML body character events to
the given output stream using the default encoding.
|
BodyContentHandler(java.io.Writer writer)
Creates a content handler that writes XHTML body character events to
the given writer.
|
characters, endDocument, endElement, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString
private static final XPathParser PARSER
private static final Matcher MATCHER
public BodyContentHandler(org.xml.sax.ContentHandler handler)
handler
- content handlerpublic BodyContentHandler(java.io.Writer writer)
writer
- writerpublic BodyContentHandler(java.io.OutputStream stream)
stream
- output streampublic BodyContentHandler(int writeLimit)
ContentHandlerDecorator.toString()
method.
The internal string buffer is bounded at the given number of characters.
If this write limit is reached, then a SAXException
is thrown.
writeLimit
- maximum number of characters to include in the string,
or -1 to disable the write limitpublic BodyContentHandler()
ContentHandlerDecorator.toString()
method.
The internal string buffer is bounded at 100k characters. If this write
limit is reached, then a SAXException
is thrown.