This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


org.xml.sax.ext
class DefaultHandler2

java.lang.Object extended by org.xml.sax.helpers.DefaultHandler extended by org.xml.sax.ext.DefaultHandler2
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, EntityResolver2, LexicalHandler

public class DefaultHandler2
extends DefaultHandler
implements LexicalHandler, DeclHandler, EntityResolver2

This class extends the SAX2 base handler class to support the SAX2 {@link LexicalHandler}, {@link DeclHandler}, and {@link EntityResolver2} extensions. Except for overriding the original SAX1 {@link DefaultHandler#resolveEntity resolveEntity()} method the added handler methods just return. Subclassers may override everything on a method-by-method basis.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

Note: this class might yet learn that the ContentHandler.setDocumentLocator() call might be passed a {@link Locator2} object, and that the ContentHandler.startElement() call might be passed a {@link Attributes2} object.


Constructor Summary

          Constructs a handler which ignores all parsing events.
 
Method Summary
 void
attributeDecl(String eName, String aName, String type, String mode, String value)

          
 void
comment(char[] ch, int start, int length)

          
 void
elementDecl(String name, String model)

          
 void

          
 void

          
 void

          
 void
externalEntityDecl(String name, String publicId, String systemId)

          
 InputSource

          Tells the parser that if no external subset has been declared in the document text, none should be used.
 void

          
 InputSource
resolveEntity(String publicId, String systemId)

          Invokes org.xml.sax.ext.EntityResolver2.resolveEntity with null entity name and base URI.
 InputSource
resolveEntity(String name, String publicId, String baseURI, String systemId)

          Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI.
 void

          
 void
startDTD(String name, String publicId, String systemId)

          
 void

          
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHandler2

public DefaultHandler2()
Constructs a handler which ignores all parsing events.

Method Detail

attributeDecl

public void attributeDecl(String eName,
                          String aName,
                          String type,
                          String mode,
                          String value)
                   throws SAXException
Parameters:
eName
aName
type
mode
value
Throws:
SAXException

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
Parameters:
ch
start
length
Throws:
SAXException

elementDecl

public void elementDecl(String name,
                        String model)
                 throws SAXException
Parameters:
name
model
Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
Throws:
SAXException

endDTD

public void endDTD()
            throws SAXException
Throws:
SAXException

endEntity

public void endEntity(String name)
               throws SAXException
Parameters:
name
Throws:
SAXException

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
                        throws SAXException
Parameters:
name
publicId
systemId
Throws:
SAXException

getExternalSubset

public InputSource getExternalSubset(String name,
                                     String baseURI)
                              throws SAXException,
                                     IOException
Tells the parser that if no external subset has been declared in the document text, none should be used.

Parameters:
name
baseURI
Throws:
SAXException
IOException

internalEntityDecl

public void internalEntityDecl(String name,
                               String value)
                        throws SAXException
Parameters:
name
value
Throws:
SAXException

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
Invokes {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} with null entity name and base URI. You only need to override that method to use this class.

Overrides:
resolveEntity in class DefaultHandler
Parameters:
publicId
systemId
Throws:
SAXException
IOException

resolveEntity

public InputSource resolveEntity(String name,
                                 String publicId,
                                 String baseURI,
                                 String systemId)
                          throws SAXException,
                                 IOException
Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. Note that because the older {@link DefaultHandler#resolveEntity DefaultHandler.resolveEntity()}, method is overridden to call this one, this method may sometimes be invoked with null name and baseURI, and with the systemId already absolutized.

Parameters:
name
publicId
baseURI
systemId
Throws:
SAXException
IOException

startCDATA

public void startCDATA()
                throws SAXException
Throws:
SAXException

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
Parameters:
name
publicId
systemId
Throws:
SAXException

startEntity

public void startEntity(String name)
                 throws SAXException
Parameters:
name
Throws:
SAXException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.