Joda System API

org.joda.property.xml
Class XMLOutputter.Handler

java.lang.Object
  |
  +--org.joda.property.xml.XMLOutputter.Handler
All Implemented Interfaces:
org.xml.sax.ContentHandler
Enclosing class:
XMLOutputter

public static class XMLOutputter.Handler
extends java.lang.Object
implements org.xml.sax.ContentHandler

Inner class to manage the SAX events. This is used to hide the public methods from the main interface.


Constructor Summary
protected XMLOutputter.Handler(java.io.Writer writer, boolean prettyPrint)
          Constructor
 
Method Summary
 void characters(char[] ch, int start, int length)
           
protected  void decreaseOffset()
          Decrease the offset
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
 void endPrefixMapping(java.lang.String prefix)
           
protected  java.lang.String escapeAttributeValue(java.lang.String value)
          Escape the specified attribute value
protected  java.lang.String escapeBodyText(java.lang.String value)
          Escape the specified body text
 void ignorableWhitespace(char[] ch, int start, int length)
           
protected  void increaseOffset()
          Increase the offset
protected  void outputNewLine()
          Output a new line
protected  void outputOffset()
          Output offset
protected  void outputStartTag(boolean closed)
          Output the start tag
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void skippedEntity(java.lang.String name)
           
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLOutputter.Handler

protected XMLOutputter.Handler(java.io.Writer writer,
                               boolean prettyPrint)
Constructor

Parameters:
writer - a writer
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(String, String, String, Attributes)

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.endElement(String, String, String)

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
See Also:
ContentHandler.setDocumentLocator(Locator)

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.startDocument()

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.endDocument()

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.ignorableWhitespace(char[], int, int)

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.processingInstruction(String, String)

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.skippedEntity(String)

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.startPrefixMapping(String, String)

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
See Also:
ContentHandler.endPrefixMapping(String)

increaseOffset

protected void increaseOffset()
Increase the offset


decreaseOffset

protected void decreaseOffset()
Decrease the offset


outputNewLine

protected void outputNewLine()
                      throws java.io.IOException
Output a new line

java.io.IOException

outputOffset

protected void outputOffset()
                     throws java.io.IOException
Output offset

java.io.IOException

outputStartTag

protected void outputStartTag(boolean closed)
                       throws java.io.IOException
Output the start tag

java.io.IOException

escapeBodyText

protected java.lang.String escapeBodyText(java.lang.String value)
Escape the specified body text


escapeAttributeValue

protected java.lang.String escapeAttributeValue(java.lang.String value)
Escape the specified attribute value


Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.