Code example for DefaultHandler

0
            EmbeddedResourceHandler handler)
            throws IOException, TikaException {
        ParseContext context = new ParseContext();
        context.set(Parser.class, new RecursiveParser(recurseExtractor, handler));
        try { 
            parser.parse(stream, new DefaultHandler(), new Metadata(), context);
        } catch (SAXException e) {
            throw new TikaException("Unexpected SAX exception", e);
        } 
    } 
 
    private class RecursiveParser extends AbstractParser { 
 
        private final ContainerExtractor extractor;
 
        private final EmbeddedResourceHandler handler;
 
        private RecursiveParser( 
                ContainerExtractor extractor,
                EmbeddedResourceHandler handler) {
Experience pair programming with AI  Get Codota for Java