public class MailOptions extends Object
MailProcessor
. Includes options controlling the exact output format
and which mail fields are included (body, to, from, subject, etc.)Modifier and Type | Field and Description |
---|---|
static Pattern |
DEFAULT_QUOTED_TEXT |
static String |
FROM |
static String |
REFS |
static String |
SUBJECT |
static String |
TO |
Constructor and Description |
---|
MailOptions() |
Modifier and Type | Method and Description |
---|---|
String |
getBodySeparator() |
Charset |
getCharset() |
int |
getChunkSize() |
File |
getInput() |
String |
getOutputDir() |
Map<String,Integer> |
getPatternOrder() |
Pattern[] |
getPatternsToMatch() |
String |
getPrefix() |
Pattern |
getQuotedTextPattern() |
String |
getSeparator() |
boolean |
isIncludeBody() |
boolean |
isStripQuotedText() |
void |
setBodySeparator(String bodySeparator)
Sets the separator to use in the output between lines in the body, the default is "\n".
|
void |
setCharset(Charset charset)
Sets the encoding of the input
|
void |
setChunkSize(int chunkSize)
Sets the size of each generated sequence file, in Megabytes.
|
void |
setIncludeBody(boolean includeBody)
Sets whether mail bodies are included in the output
|
void |
setInput(File input) |
void |
setOutputDir(String outputDir)
Sets the output directory where sequence files will be written.
|
void |
setPatternOrder(Map<String,Integer> patternOrder) |
void |
setPatternsToMatch(Pattern[] patternsToMatch)
Sets the list of patterns to be applied in the given order to extract metadata fields (to, from, subject, etc.)
from the input
|
void |
setPrefix(String prefix)
Sets the prefix that is combined with the archive name and with message ids to create
SequenceFile keys. |
void |
setQuotedTextPattern(Pattern quotedTextPattern)
Sets the
Pattern to use to identify lines that are quoted text. |
void |
setSeparator(String separator)
Sets the separator to use in the output between metadata items (to, from, etc.).
|
void |
setStripQuotedText(boolean stripQuotedText)
Sets whether quoted text such as lines starting with | or > is striped off.
|
public static final String FROM
public static final String TO
public static final String REFS
public static final String SUBJECT
public static final Pattern DEFAULT_QUOTED_TEXT
public File getInput()
public void setInput(File input)
public String getOutputDir()
public void setOutputDir(String outputDir)
public String getPrefix()
public void setPrefix(String prefix)
SequenceFile
keys.prefix
- The name of the directory containing the mail archive is commonly used.public int getChunkSize()
public void setChunkSize(int chunkSize)
public Charset getCharset()
public void setCharset(Charset charset)
public String getSeparator()
public void setSeparator(String separator)
public String getBodySeparator()
public void setBodySeparator(String bodySeparator)
public boolean isIncludeBody()
public void setIncludeBody(boolean includeBody)
public Pattern[] getPatternsToMatch()
public void setPatternsToMatch(Pattern[] patternsToMatch)
public boolean isStripQuotedText()
public void setStripQuotedText(boolean stripQuotedText)
public Pattern getQuotedTextPattern()
public void setQuotedTextPattern(Pattern quotedTextPattern)
Pattern
to use to identify lines that are quoted text. Default is | and >setStripQuotedText(boolean)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.