Class DefaultContentHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
    Direct Known Subclasses:
    ParsingContentHandler, SerializingContentHandler

    public class DefaultContentHandler
    extends org.xml.sax.helpers.DefaultHandler
    Adapter class for exposing a ContentHandler instance as DefaultHandler object.
    Since:
    Jackrabbit JCR Commons 1.5
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultContentHandler​(org.xml.sax.ContentHandler handler)
      Creates a DefaultHandler adapter for the given content handler.
    • Constructor Detail

      • DefaultContentHandler

        public DefaultContentHandler​(org.xml.sax.ContentHandler handler)
        Creates a DefaultHandler adapter for the given content handler.
        Parameters:
        handler - content handler
    • Method Detail

      • characters

        public void characters​(char[] ch,
                               int start,
                               int length)
                        throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        characters in interface org.xml.sax.ContentHandler
        Overrides:
        characters in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        ch - passed through
        start - passed through
        length - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Overrides:
        endDocument in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • endElement

        public void endElement​(java.lang.String namespaceURI,
                               java.lang.String localName,
                               java.lang.String qName)
                        throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        namespaceURI - passed through
        localName - passed through
        qName - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • endPrefixMapping

        public void endPrefixMapping​(java.lang.String prefix)
                              throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        endPrefixMapping in interface org.xml.sax.ContentHandler
        Overrides:
        endPrefixMapping in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        prefix - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • ignorableWhitespace

        public void ignorableWhitespace​(char[] ch,
                                        int start,
                                        int length)
                                 throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        ignorableWhitespace in interface org.xml.sax.ContentHandler
        Overrides:
        ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        ch - passed through
        start - passed through
        length - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • processingInstruction

        public void processingInstruction​(java.lang.String target,
                                          java.lang.String data)
                                   throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        processingInstruction in interface org.xml.sax.ContentHandler
        Overrides:
        processingInstruction in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        target - passed through
        data - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • setDocumentLocator

        public void setDocumentLocator​(org.xml.sax.Locator locator)
        Delegated to handler.
        Specified by:
        setDocumentLocator in interface org.xml.sax.ContentHandler
        Overrides:
        setDocumentLocator in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        locator - passed through
      • skippedEntity

        public void skippedEntity​(java.lang.String name)
                           throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        skippedEntity in interface org.xml.sax.ContentHandler
        Overrides:
        skippedEntity in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        name - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • startDocument

        public void startDocument()
                           throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        startDocument in interface org.xml.sax.ContentHandler
        Overrides:
        startDocument in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • 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
        Delegated to handler.
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        namespaceURI - passed through
        localName - passed through
        qName - passed through
        atts - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs
      • startPrefixMapping

        public void startPrefixMapping​(java.lang.String prefix,
                                       java.lang.String uri)
                                throws org.xml.sax.SAXException
        Delegated to handler.
        Specified by:
        startPrefixMapping in interface org.xml.sax.ContentHandler
        Overrides:
        startPrefixMapping in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        prefix - passed through
        uri - passed through
        Throws:
        org.xml.sax.SAXException - if an error occurs