Metadata metadata, ParseContext context)
throws IOException, SAXException, TikaException {
XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
xhtml.startDocument();
POIFSFileSystem filesystem = new POIFSFileSystem(stream);
// Parse summary entries first, to make metadata available early
parseSummaryEntryIfExists(
filesystem, SUMMARY_INFORMATION, metadata);
parseSummaryEntryIfExists(
filesystem, DOCUMENT_SUMMARY_INFORMATION, metadata);
// Parse remaining document entries
boolean outlookExtracted = false;
Iterator<?> entries = filesystem.getRoot().getEntries();
while (entries.hasNext()) {
Entry entry = (Entry) entries.next();
String name = entry.getName();
if (!(entry instanceof DocumentEntry)) {
// Skip directory entries