) throws IOException, ExtractionException {
final SingleDocumentExtraction ex = new SingleDocumentExtraction(configuration, in, factories, outputHandler);
ex.setMIMETypeDetector(mimeTypeDetector);
ex.setLocalCopyFactory(streamCache);
ex.setParserEncoding(encoding);
final SingleDocumentExtractionReport sder = ex.run(eps);
return new ExtractionReport(
ex.getMatchingExtractors(),
ex.getParserEncoding(),
ex.getDetectedMIMEType(),
sder.getValidationReport(),
sder.getExtractorToIssues()
);
}