Class Sax2XMLReaderCreator

  • All Implemented Interfaces:
    XMLReaderCreator

    public class Sax2XMLReaderCreator
    extends java.lang.Object
    implements XMLReaderCreator
    An XMLReaderCreator that creates XMLReaders using the SAX2 XMLReaderFactory. An instance of this class is safe for concurrent access by multiple threads.
    Author:
    James Clark
    See Also:
    XMLReaderFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      Sax2XMLReaderCreator()
      Constructs a Sax2XMLReaderCreator that uses system defaults to construct XMLReaders.
      Sax2XMLReaderCreator​(java.lang.String className)
      Constructs a Sax2XMLReaderCreator that constructs XMLReaders with the specified class name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.xml.sax.XMLReader createXMLReader()
      Creates a new XMLReader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sax2XMLReaderCreator

        public Sax2XMLReaderCreator()
        Constructs a Sax2XMLReaderCreator that uses system defaults to construct XMLReaders.
      • Sax2XMLReaderCreator

        public Sax2XMLReaderCreator​(java.lang.String className)
        Constructs a Sax2XMLReaderCreator that constructs XMLReaders with the specified class name.
        Parameters:
        className - the fully-qualified name of the class implementing XMLReader; if null equivalent to the no-argument constructor
    • Method Detail

      • createXMLReader

        public org.xml.sax.XMLReader createXMLReader()
                                              throws org.xml.sax.SAXException
        Description copied from interface: XMLReaderCreator
        Creates a new XMLReader.
        Specified by:
        createXMLReader in interface XMLReaderCreator
        Returns:
        a new XMLReader; never null
        Throws:
        org.xml.sax.SAXException - If an XMLReader cannot be created for any reason