private static SAXParser acquireSAXParser() throws TikaException {
        while (true) {
            SAXParser parser = null;
            try {
                READ_WRITE_LOCK.readLock().lock();
                parser = SAX_PARSERS.poll(10, TimeUnit.MILLISECONDS);
            } catch (InterruptedException e) {
                throw new TikaException("interrupted while waiting for SAXParser", e);
            } finally {
                READ_WRITE_LOCK.readLock().unlock();

            }
            if (parser != null) {
                return parser;
            }
        }
    }
Acquire a SAXParser from the pool; create one if it
doesn't exist.  Make sure to {@link #releaseParser(SAXParser)} in
a <code>finally</code> block every time you call this.

@return a SAXParser
@throws TikaException
tika-core/src/main/java/org/apache/tika/mime/MimeTypesReader.java