org.apache.commons.jelly.util
Class SafeContentHandler

java.lang.Object
  extended by org.apache.commons.jelly.util.SafeContentHandler
All Implemented Interfaces:
ContentHandler

public class SafeContentHandler
extends Object
implements ContentHandler

Ensures that only one start and end document event is passed onto the underlying ContentHandler. This object can only be used once and then discarded.

Author:
James Strachan

Constructor Summary
SafeContentHandler(ContentHandler handler)
           
 
Method Summary
 void characters(char[] arg0, int arg1, int arg2)
           
 void endDocument()
           
 void endElement(String arg0, String arg1, String arg2)
           
 void endPrefixMapping(String arg0)
           
 void ignorableWhitespace(char[] arg0, int arg1, int arg2)
           
 void processingInstruction(String arg0, String arg1)
           
 void setDocumentLocator(Locator arg0)
           
 void skippedEntity(String arg0)
           
 void startDocument()
           
 void startElement(String arg0, String arg1, String arg2, Attributes arg3)
           
 void startPrefixMapping(String arg0, String arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeContentHandler

public SafeContentHandler(ContentHandler handler)
Method Detail

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Throws:
SAXException

characters

public void characters(char[] arg0,
                       int arg1,
                       int arg2)
                throws SAXException
Specified by:
characters in interface ContentHandler
Parameters:
arg0 -
arg1 -
arg2 -
Throws:
SAXException

endElement

public void endElement(String arg0,
                       String arg1,
                       String arg2)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Parameters:
arg0 -
arg1 -
arg2 -
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String arg0)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Parameters:
arg0 -
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] arg0,
                                int arg1,
                                int arg2)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Parameters:
arg0 -
arg1 -
arg2 -
Throws:
SAXException

processingInstruction

public void processingInstruction(String arg0,
                                  String arg1)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Parameters:
arg0 -
arg1 -
Throws:
SAXException

setDocumentLocator

public void setDocumentLocator(Locator arg0)
Specified by:
setDocumentLocator in interface ContentHandler
Parameters:
arg0 -

skippedEntity

public void skippedEntity(String arg0)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
Parameters:
arg0 -
Throws:
SAXException

startElement

public void startElement(String arg0,
                         String arg1,
                         String arg2,
                         Attributes arg3)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Parameters:
arg0 -
arg1 -
arg2 -
arg3 -
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String arg0,
                               String arg1)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Parameters:
arg0 -
arg1 -
Throws:
SAXException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.