Class DefaultContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.jackrabbit.commons.xml.DefaultContentHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
ParsingContentHandler
,SerializingContentHandler
public class DefaultContentHandler extends DefaultHandler
Adapter class for exposing aContentHandler
instance asDefaultHandler
object.- Since:
- Jackrabbit JCR Commons 1.5
-
-
Constructor Summary
Constructors Constructor Description DefaultContentHandler(ContentHandler handler)
Creates aDefaultHandler
adapter for the given content handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Delegated tohandler
.void
endDocument()
Delegated tohandler
.void
endElement(String namespaceURI, String localName, String qName)
Delegated tohandler
.void
endPrefixMapping(String prefix)
Delegated tohandler
.void
ignorableWhitespace(char[] ch, int start, int length)
Delegated tohandler
.void
processingInstruction(String target, String data)
Delegated tohandler
.void
setDocumentLocator(Locator locator)
Delegated tohandler
.void
skippedEntity(String name)
Delegated tohandler
.void
startDocument()
Delegated tohandler
.void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
Delegated tohandler
.void
startPrefixMapping(String prefix, String uri)
Delegated tohandler
.-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
DefaultContentHandler
public DefaultContentHandler(ContentHandler handler)
Creates aDefaultHandler
adapter for the given content handler.- Parameters:
handler
- content handler
-
-
Method Detail
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
Delegated tohandler
.- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Parameters:
ch
- passed throughstart
- passed throughlength
- passed through- Throws:
SAXException
- if an error occurs
-
endDocument
public void endDocument() throws SAXException
Delegated tohandler
.- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
- if an error occurs
-
endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
Delegated tohandler
.- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Parameters:
namespaceURI
- passed throughlocalName
- passed throughqName
- passed through- Throws:
SAXException
- if an error occurs
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
Delegated tohandler
.- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classDefaultHandler
- Parameters:
prefix
- passed through- Throws:
SAXException
- if an error occurs
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
Delegated tohandler
.- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classDefaultHandler
- Parameters:
ch
- passed throughstart
- passed throughlength
- passed through- Throws:
SAXException
- if an error occurs
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
Delegated tohandler
.- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classDefaultHandler
- Parameters:
target
- passed throughdata
- passed through- Throws:
SAXException
- if an error occurs
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
Delegated tohandler
.- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
- Parameters:
locator
- passed through
-
skippedEntity
public void skippedEntity(String name) throws SAXException
Delegated tohandler
.- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classDefaultHandler
- Parameters:
name
- passed through- Throws:
SAXException
- if an error occurs
-
startDocument
public void startDocument() throws SAXException
Delegated tohandler
.- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
- if an error occurs
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
Delegated tohandler
.- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Parameters:
namespaceURI
- passed throughlocalName
- passed throughqName
- passed throughatts
- passed through- Throws:
SAXException
- if an error occurs
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
Delegated tohandler
.- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classDefaultHandler
- Parameters:
prefix
- passed throughuri
- passed through- Throws:
SAXException
- if an error occurs
-
-