Package org.apache.tika.example
Class LanguageDetectingParser
- java.lang.Object
- 
- org.apache.tika.parser.AbstractParser
- 
- org.apache.tika.parser.DelegatingParser
- 
- org.apache.tika.example.LanguageDetectingParser
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Parser
 
 public class LanguageDetectingParser extends DelegatingParser - See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description LanguageDetectingParser()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidparse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context)Looks up the delegate parser from the parsing context and delegates the parse operation to it.- 
Methods inherited from class org.apache.tika.parser.DelegatingParsergetDelegateParser, getSupportedTypes
 - 
Methods inherited from class org.apache.tika.parser.AbstractParserparse
 
- 
 
- 
- 
- 
Method Detail- 
parsepublic void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws SAXException, IOException, TikaException Description copied from class:DelegatingParserLooks up the delegate parser from the parsing context and delegates the parse operation to it. If a delegate parser is not found, then an empty XHTML document is returned.Subclasses 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. - Specified by:
- parsein interface- Parser
- Overrides:
- parsein class- DelegatingParser
- Parameters:
- stream- the document stream (input)
- handler- handler for the XHTML SAX events (output)
- metadata- document metadata (input and output)
- context- parse context
- Throws:
- SAXException- if the SAX events could not be processed
- IOException- if the document stream could not be read
- TikaException- if the document could not be parsed
 
 
- 
 
-