public class SerializingContentHandler extends Object implements ContentHandler
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private StringBuilder |
buffer |
private boolean |
newlines |
Constructor and Description |
---|
SerializingContentHandler()
Default ctor that does not insert newlines.
|
SerializingContentHandler(boolean newlines)
Default ctor that conditionally inserts newlines.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] chars,
int start,
int length) |
void |
endDocument() |
void |
endElement(String uri,
String localname,
String qname) |
void |
endPrefixMapping(String prefix) |
void |
ignorableWhitespace(char[] chars,
int start,
int length) |
void |
processingInstruction(String target,
String data) |
void |
setDocumentLocator(Locator locator) |
void |
skippedEntity(String name) |
void |
startDocument() |
void |
startElement(String uri,
String localname,
String qname,
Attributes attrs) |
void |
startPrefixMapping(String prefix,
String uri) |
String |
toString() |
private boolean newlines
private StringBuilder buffer
public SerializingContentHandler()
public SerializingContentHandler(boolean newlines)
newlines
- whether newlines are desiredpublic void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument()
startDocument
in interface ContentHandler
public void endDocument()
endDocument
in interface ContentHandler
public void startPrefixMapping(String prefix, String uri)
startPrefixMapping
in interface ContentHandler
public void endPrefixMapping(String prefix)
endPrefixMapping
in interface ContentHandler
public void startElement(String uri, String localname, String qname, Attributes attrs)
startElement
in interface ContentHandler
public void endElement(String uri, String localname, String qname)
endElement
in interface ContentHandler
public void characters(char[] chars, int start, int length)
characters
in interface ContentHandler
public void ignorableWhitespace(char[] chars, int start, int length)
ignorableWhitespace
in interface ContentHandler
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
public void skippedEntity(String name)
skippedEntity
in interface ContentHandler