Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.utils
Class XMLReaderManager

    java.lang.Object
      org.apache.xml.utils.XMLReaderManager

public class XMLReaderManager
extends java.lang.Object

Creates XMLReader objects and caches them for re-use. This class follows the singleton pattern.

Method Summary
`static XMLReaderManager` | `getInstance()` Retrieves the singleton reader manager
`XMLReader` | `getXMLReader()` Retrieves a cached XMLReader for this thread, or creates a new XMLReader, if the existing reader is in use.
`void` | `releaseXMLReader(XMLReader reader)` Mark the cached XMLReader as available.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static XMLReaderManager getInstance()

  Retrieves the singleton reader manager

### getXMLReader

    public XMLReader getXMLReader()
                           throws SAXException

  Retrieves a cached XMLReader for this thread, or creates a new XMLReader, if the existing reader is in use. When the caller no longer needs the reader, it must release it with a call to `releaseXMLReader`.

  Throws:
    `SAXException`

### releaseXMLReader

    public void releaseXMLReader(XMLReader reader)

  Mark the cached XMLReader as available. If the reader was not actually in the cache, do nothing.

  Parameters:
    `reader` - The XMLReader that's being released.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache XML Project. All Rights Reserved.