private MetadataListAndEmbeddedBytes parseWithStream(FetchEmitTuple fetchEmitTuple,
                                                         InputStream stream, Metadata metadata)
            throws TikaConfigException {

        List<Metadata> metadataList;
        //this adds the EmbeddedDocumentByteStore to the parsecontext
        ParseContext parseContext = setupParseContext(fetchEmitTuple);
        HandlerConfig handlerConfig = parseContext.get(HandlerConfig.class);
        if (handlerConfig.getParseMode() == HandlerConfig.PARSE_MODE.RMETA) {
            metadataList =
                    parseRecursive(fetchEmitTuple, handlerConfig, stream, metadata, parseContext);
        } else {
            metadataList = parseConcatenated(fetchEmitTuple, handlerConfig, stream, metadata,
                    parseContext);
        }

        return new MetadataListAndEmbeddedBytes(metadataList,
                parseContext.get(EmbeddedDocumentBytesHandler.class));
    }
returns stack trace if there was a container exception or empty string
if there was no stacktrace

@param t
@param metadataList
@return
tika-core/src/main/java/org/apache/tika/pipes/PipesServer.java