public class DigestingParser extends ParserDecorator
Modifier and Type | Class and Description |
---|---|
static interface |
DigestingParser.Digester
Interface for optional digester, if specified during construction.
|
Constructor and Description |
---|
DigestingParser(Parser parser,
DigestingParser.Digester digester)
Creates a decorator for the given parser.
|
Modifier and Type | Method and Description |
---|---|
void |
parse(InputStream stream,
ContentHandler handler,
Metadata metadata,
ParseContext context)
Delegates the method call to the decorated parser.
|
getDecorationName, getSupportedTypes, getWrappedParser, withFallbacks, withoutTypes, withTypes
parse
public DigestingParser(Parser parser, DigestingParser.Digester digester)
parser
- the parser instance to be decoratedpublic void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException
ParserDecorator
super.parse()
to invoke
the decorated parser) to implement extra decoration.parse
in interface Parser
parse
in class ParserDecorator
stream
- the document stream (input)handler
- handler for the XHTML SAX events (output)metadata
- document metadata (input and output)context
- parse contextIOException
- if the document stream could not be readSAXException
- if the SAX events could not be processedTikaException
- if the document could not be parsedCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.