Class XMLReaderPool


  • public class XMLReaderPool
    extends java.lang.Object
    This class maintains a pool of XMLReaders. To use it, create an XMLReaderPool, and then checkOut and checkIn readers as follows:

     XMLReader reader = null;
     try {
      reader = pool.checkOut();
      // Set Content handler and parse
    
     } finally {
      pool.checkIn(reader);
     }
    
     
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLReaderPool()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkIn​(org.xml.sax.XMLReader reader)  
      org.xml.sax.XMLReader checkOut()  
      protected org.xml.sax.XMLReader create()  
      javax.xml.parsers.SAXParserFactory getSaxFactory()  
      • Methods inherited from class java.lang.Object

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

      • XMLReaderPool

        public XMLReaderPool()
    • Method Detail

      • getSaxFactory

        public javax.xml.parsers.SAXParserFactory getSaxFactory()
      • create

        protected org.xml.sax.XMLReader create()
      • checkOut

        public org.xml.sax.XMLReader checkOut()
      • checkIn

        public void checkIn​(org.xml.sax.XMLReader reader)