@Test public void testNoFormat() throws Exception { ContentHandler handler = new BodyContentHandler(); Metadata metadata = new Metadata(); try (InputStream stream = WordParserTest.class.getResourceAsStream( "/test-documents/testWORD_no_format.docx")) { new OOXMLParser().parse(stream, handler, metadata, new ParseContext()); } String content = handler.toString(); assertContains("This is a piece of text that causes an exception", content); }
public void parse( InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { configure(context); OOXMLExtractorFactory.parse(stream, handler, metadata, context); }
OOXMLParser extends AbstractOfficeParser { public void parse( InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { configure(context); OOXMLExtractorFactory.parse(stream, handler, metadata, context); } }
OOXMLParser extends AbstractOfficeParser { public void parse( InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { configure(context); OOXMLExtractorFactory.parse(stream, handler, metadata, context); }  }
OOXMLParser extends AbstractOfficeParser { public void parse( InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { configure(context); OOXMLExtractorFactory.parse(stream, handler, metadata, context); }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); }
OOXMLParser extends AbstractOfficeParser { public void parse( InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { configure(context); OOXMLExtractorFactory.parse(stream, handler, metadata, context); }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context);  }