private DocumentReport getTagSoupDOM(ExtractionParameters extractionParameters)
throws IOException, ValidatorException {
if (documentReport == null || !extractionParameters.equals(tagSoupDOMRelatedParameters)) {
ensureHasLocalCopy();
final InputStream is = new BufferedInputStream( localDocumentSource.openInputStream() );
is.mark(Integer.MAX_VALUE);
final String candidateEncoding = getParserEncoding();
is.reset();
final TagSoupParser tagSoupParser = new TagSoupParser(
is,
documentURI.stringValue(),