public class CanonicalPrinter extends Object implements ContentHandler
Modifier and Type | Field and Description |
---|---|
protected PrintWriter |
writer |
Constructor and Description |
---|
CanonicalPrinter(OutputStream stream,
boolean closeWRiter)
Creates a CanonicalPrinter that writes to the given OutputStream.
|
CanonicalPrinter(Writer writer,
boolean closeWRiter)
Creates a CanonicalPrinter that writes to the given Writer.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endDocument() |
void |
endElement(String uri,
String localName,
String name) |
void |
endPrefixMapping(String prefix) |
String |
escape(String attrval) |
void |
ignorableWhitespace(char[] ch,
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 name,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
protected PrintWriter writer
public CanonicalPrinter(OutputStream stream, boolean closeWRiter)
public CanonicalPrinter(Writer writer, boolean closeWRiter)
public void startDocument()
startDocument
in interface ContentHandler
public void startElement(String uri, String localName, String name, Attributes atts)
startElement
in interface ContentHandler
public void endElement(String uri, String localName, String name)
endElement
in interface ContentHandler
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
public void ignorableWhitespace(char[] ch, int start, int length)
ignorableWhitespace
in interface ContentHandler
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
public void endDocument()
endDocument
in interface ContentHandler
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException