org.apache.tika.fork
Class ForkParser

java.lang.Object
  extended by org.apache.tika.parser.DelegatingParser
      extended by org.apache.tika.fork.ForkParser
All Implemented Interfaces:
java.io.Serializable, Parser

public class ForkParser
extends DelegatingParser

See Also:
Serialized Form

Constructor Summary
ForkParser(java.lang.ClassLoader loader)
           
 
Method Summary
 void close()
           
static void main(java.lang.String[] args)
           
 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.
 
Methods inherited from class org.apache.tika.parser.DelegatingParser
getDelegateParser, getSupportedTypes, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForkParser

public ForkParser(java.lang.ClassLoader loader)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

parse

public void parse(java.io.InputStream stream,
                  org.xml.sax.ContentHandler handler,
                  Metadata metadata,
                  ParseContext context)
           throws java.io.IOException,
                  org.xml.sax.SAXException,
                  TikaException
Description copied from class: DelegatingParser
Looks 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:
parse in interface Parser
Overrides:
parse in 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:
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

close

public void close()


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.