public class AbstractContentWriterHandler extends Object implements ContentHandler
| Modifier and Type | Field and Description |
|---|---|
protected Attributes |
EMPTY_ATTRIBUTES |
protected String |
encoding |
| Constructor and Description |
|---|
AbstractContentWriterHandler(Writer out,
String encoding,
String charNewLine,
String charTab)
Creates XmlWriter which prints to the Writer interface.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
autoCloseStartElement()
Auto close the start element if working in printing event.
|
void |
characters(char c) |
void |
characters(char[] ch,
int start,
int length)
Prints xml characters and uses characters(java.lang.String) method.
|
void |
characters(String text)
Escape and prints xml characters.
|
void |
charactersRaw(String text) |
void |
closeWriter() |
void |
closeWriterSafe() |
void |
comment(char[] ch,
int start,
int length)
Prints xml comment.
|
void |
comment(String text)
Prints xml comment.
|
void |
endDocument() |
void |
endElement(String uri,
String localName,
String name) |
void |
endPrefixMapping(String prefix) |
void |
ignorableWhitespace(char c)
Prints xml ignorable whitespace character.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Prints xml ignorable whitespace.
|
void |
ignorableWhitespace(String text)
Prints xml ignorable whitespace.
|
void |
processingInstruction(String target,
String data)
Prints xml instructions.
|
void |
setDocumentLocator(Locator locator)
Not implemented.
|
void |
skippedEntity(String name)
Not implemented.
|
void |
startDocument() |
void |
startElement(String uri,
String localName,
String name,
Attributes atts) |
void |
startElementNamespace(String uri) |
void |
startElementNamespaceAll(String uri) |
void |
startElementTag(String uri,
String localName) |
void |
startPrefixMapping(String prefix,
String uri)
Starts the prefix mapping of an xml namespace uri.
|
protected void |
writeFlush() |
protected final Attributes EMPTY_ATTRIBUTES
protected String encoding
public void closeWriter()
throws IOException
IOExceptionpublic void closeWriterSafe()
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionContentHandler.startDocument()public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionContentHandler.endDocument()public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException
startElement in interface ContentHandleruri - The xml namespace uri.localName - The local name of the xml tag.name - The (full) name of the xml tag.atts - The attributes of the xml tag.SAXExceptionContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)public void startElementTag(String uri, String localName) throws SAXException
SAXExceptionpublic void startElementNamespace(String uri) throws SAXException
SAXExceptionpublic void startElementNamespaceAll(String uri) throws SAXException
SAXExceptionpublic void endElement(String uri, String localName, String name) throws SAXException
endElement in interface ContentHandleruri - The xml namespace uri.localName - The local name of the xml tag.name - The (full) name of the xml tag.SAXExceptionContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerprefix - The xml prefix of this xml namespace uri.uri - The xml namespace uri to add the prefix for.SAXExceptionContentHandler.startPrefixMapping(java.lang.String, java.lang.String)public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerprefix - The xml prefix of this xml namespace uri to be ended.SAXExceptionContentHandler.endPrefixMapping(java.lang.String)public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerch - Character buffer.start - The start index of the chars in the ch buffer.length - The length index of the chars in the ch buffer.SAXException - When IOException has happend while printing.ContentHandler.characters(char[], int, int)public void characters(String text) throws SAXException
SAXExceptionContentWriter.characters(java.lang.String)public void characters(char c)
throws SAXException
SAXExceptionpublic void charactersRaw(String text) throws SAXException
SAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerch - Character buffer.start - The start index of the chars in the ch buffer.length - The length index of the chars in the ch buffer.SAXException - When IOException has happend while printing.ContentHandler.ignorableWhitespace(char[], int, int)public void ignorableWhitespace(String text) throws SAXException
text - The text to print.SAXException - When IOException has happend while printing.ContentWriter.ignorableWhitespace(java.lang.String)public void ignorableWhitespace(char c)
throws SAXException
c - The character to print.SAXException - When IOException has happend while printing.public void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlertarget - The target.data - The data.SAXExceptionContentHandler.processingInstruction(java.lang.String, java.lang.String)public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerlocator - The DocumentLocator to set.ContentHandler.setDocumentLocator(org.xml.sax.Locator)public void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlername - The name of the skipped entity.SAXExceptionContentHandler.skippedEntity(java.lang.String)public void comment(char[] ch,
int start,
int length)
throws SAXException
ch - Character buffer.start - The start index of the chars in the ch buffer.length - The length index of the chars in the ch buffer.SAXException - When IOException has happend while printing.DefaultHandler2.comment(char[], int, int)public void comment(String text) throws SAXException
SAXExceptionContentWriter.comment(java.lang.String)protected void autoCloseStartElement()
throws SAXException
IOException - When prints gives exception.SAXExceptionprotected void writeFlush()
throws SAXException
SAXExceptionCopyright © 2004-2013 X4O. All Rights Reserved.