Home | History | Annotate | Download | only in utils

Lines Matching refs:reader

68      * Retrieves the singleton reader manager
76 * XMLReader, if the existing reader is in use. When the caller no
77 * longer needs the reader, it must release it with a call to
81 XMLReader reader;
94 // If the cached reader for this thread is in use, construct a new
95 // one; otherwise, return the cached reader.
96 reader = (XMLReader) m_readers.get();
97 boolean threadHasReader = (reader != null);
98 if (!threadHasReader || m_inUse.get(reader) == Boolean.TRUE) {
103 // TransformerFactory creates a reader via the
105 reader = XMLReaderFactory.createXMLReader();
115 reader = m_parserFactory.newSAXParser().getXMLReader();
121 reader.setFeature(NAMESPACES_FEATURE, true);
122 reader.setFeature(NAMESPACE_PREFIXES_FEATURE, false);
136 // a reader for this thread.
138 m_readers.set(reader);
139 m_inUse.put(reader, Boolean.TRUE);
142 m_inUse.put(reader, Boolean.TRUE);
145 return reader;
149 * Mark the cached XMLReader as available. If the reader was not
152 * @param reader The XMLReader that's being released.
154 public synchronized void releaseXMLReader(XMLReader reader) {
155 // If the reader that's being released is the cached reader
157 if (m_readers.get() == reader && reader != null) {
158 m_inUse.remove(reader);