org.apache.tika.parser
Class AutoDetectParser

java.lang.Object
  extended by org.apache.tika.parser.CompositeParser
      extended by org.apache.tika.parser.AutoDetectParser
All Implemented Interfaces:
Parser

public class AutoDetectParser
extends CompositeParser


Constructor Summary
AutoDetectParser()
          Creates an auto-detecting parser instance using the default Tika configuration.
AutoDetectParser(TikaConfig config)
           
 
Method Summary
 MimeTypes getMimeTypes()
           
 void parse(java.io.InputStream stream, org.xml.sax.ContentHandler handler, Metadata metadata)
          Delegates the call to the matching component parser.
 void setConfig(TikaConfig config)
           
 void setMimeTypes(MimeTypes types)
           
 
Methods inherited from class org.apache.tika.parser.CompositeParser
getFallback, getParser, getParsers, setFallback, setParsers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoDetectParser

public AutoDetectParser()
Creates an auto-detecting parser instance using the default Tika configuration.


AutoDetectParser

public AutoDetectParser(TikaConfig config)
Method Detail

setConfig

public void setConfig(TikaConfig config)

getMimeTypes

public MimeTypes getMimeTypes()

setMimeTypes

public void setMimeTypes(MimeTypes types)

parse

public void parse(java.io.InputStream stream,
                  org.xml.sax.ContentHandler handler,
                  Metadata metadata)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  TikaException
Description copied from class: CompositeParser
Delegates the call to the matching component parser.

Specified by:
parse in interface Parser
Overrides:
parse in class CompositeParser
Parameters:
stream - the document stream (input)
handler - handler for the XHTML SAX events (output)
metadata - document metadata (input and output)
Throws:
java.io.IOException - if the document stream could not be read
org.xml.sax.SAXException - if the SAX events could not be processed
TikaException - if the document could not be parsed


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.