org.apache.tika.parser.mbox
Class MboxParser

java.lang.Object
  extended by org.apache.tika.parser.AbstractParser
      extended by org.apache.tika.parser.mbox.MboxParser
All Implemented Interfaces:
Serializable, org.apache.tika.parser.Parser

public class MboxParser
extends org.apache.tika.parser.AbstractParser

Mbox (mailbox) parser. This version returns the headers for the first email via metadata, which means headers from subsequent emails will be lost.

See Also:
Serialized Form

Field Summary
static String MBOX_MIME_TYPE
           
static String MBOX_RECORD_DIVIDER
           
 
Constructor Summary
MboxParser()
           
 
Method Summary
 Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)
           
 void parse(InputStream stream, ContentHandler handler, org.apache.tika.metadata.Metadata metadata, org.apache.tika.parser.ParseContext context)
           
static Date parseDate(String headerContent)
           
 
Methods inherited from class org.apache.tika.parser.AbstractParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBOX_MIME_TYPE

public static final String MBOX_MIME_TYPE
See Also:
Constant Field Values

MBOX_RECORD_DIVIDER

public static final String MBOX_RECORD_DIVIDER
See Also:
Constant Field Values
Constructor Detail

MboxParser

public MboxParser()
Method Detail

getSupportedTypes

public Set<org.apache.tika.mime.MediaType> getSupportedTypes(org.apache.tika.parser.ParseContext context)

parse

public void parse(InputStream stream,
                  ContentHandler handler,
                  org.apache.tika.metadata.Metadata metadata,
                  org.apache.tika.parser.ParseContext context)
           throws IOException,
                  org.apache.tika.exception.TikaException,
                  SAXException
Throws:
IOException
org.apache.tika.exception.TikaException
SAXException

parseDate

public static Date parseDate(String headerContent)
                      throws ParseException
Throws:
ParseException


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