public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
                      ParseContext context) throws IOException, SAXException, TikaException {
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);

        TemporaryResources tmp = new TemporaryResources();
        try {
            parse(TikaInputStream.get(stream, tmp, metadata), xhtml, metadata, tmp);
        } finally {
            tmp.dispose();
        }
    }
Executes the configured external command and passes the given document
stream as a simple XHTML document to the given SAX content handler.
Metadata is only extracted if {@link #setMetadataExtractionPatterns(Map)}
has been called to set patterns.
tika-core/src/main/java/org/apache/tika/parser/external/ExternalParser.java