public abstract class CryptoParser extends DelegatingParser
| Modifier and Type | Field and Description |
|---|---|
private java.security.Provider |
provider |
private static long |
serialVersionUID
Serial version UID
|
private java.lang.String |
transformation |
private java.util.Set<MediaType> |
types |
| Constructor and Description |
|---|
CryptoParser(java.lang.String transformation,
java.security.Provider provider,
java.util.Set<MediaType> types) |
CryptoParser(java.lang.String transformation,
java.util.Set<MediaType> types) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<MediaType> |
getSupportedTypes(ParseContext context)
Returns the set of media types supported by this parser when used
with the given parse context.
|
void |
parse(java.io.InputStream stream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
ParseContext context)
Looks up the delegate parser from the parsing context and
delegates the parse operation to it.
|
getDelegateParserparseprivate static final long serialVersionUID
private final java.lang.String transformation
private final java.security.Provider provider
private final java.util.Set<MediaType> types
public CryptoParser(java.lang.String transformation,
java.security.Provider provider,
java.util.Set<MediaType> types)
public CryptoParser(java.lang.String transformation,
java.util.Set<MediaType> types)
public java.util.Set<MediaType> getSupportedTypes(ParseContext context)
ParsergetSupportedTypes in interface ParsergetSupportedTypes in class DelegatingParsercontext - parse contextpublic void parse(java.io.InputStream stream,
org.xml.sax.ContentHandler handler,
Metadata metadata,
ParseContext context)
throws java.io.IOException,
org.xml.sax.SAXException,
TikaException
DelegatingParserSubclasses should override this method to parse the top level structure of the given document stream. Parsed sub-streams can be passed to this base class method to be parsed by the configured delegate parser.
parse in interface Parserparse in class DelegatingParserstream - the document stream (input)handler - handler for the XHTML SAX events (output)metadata - document metadata (input and output)context - parse contextjava.io.IOException - if the document stream could not be readorg.xml.sax.SAXException - if the SAX events could not be processedTikaException - if the document could not be parsed