public class MessageSearcher extends Object
Constructor and Description |
---|
MessageSearcher() |
MessageSearcher(CharSequence searchContent,
boolean isCaseInsensitive,
boolean includeHeaders) |
Modifier and Type | Method and Description |
---|---|
org.slf4j.Logger |
getLogger() |
CharSequence |
getSearchContent()
Gets the content to be searched for.
|
protected void |
handle(Exception e) |
boolean |
isCaseInsensitive()
Is this search case insensitive?
|
boolean |
isFoundIn(InputStream input)
Is
getSearchContent() found in the given input? |
boolean |
isIncludeHeaders()
Is the search to include headers?
|
void |
setCaseInsensitive(boolean isCaseInsensitive)
Sets whether the search should be case insensitive.
|
void |
setIncludeHeaders(boolean includesHeaders)
Sets whether the search should include headers.
|
void |
setLogger(org.slf4j.Logger logger) |
void |
setSearchContent(CharSequence searchContent)
Sets the content sought.
|
public MessageSearcher()
public MessageSearcher(CharSequence searchContent, boolean isCaseInsensitive, boolean includeHeaders)
public boolean isIncludeHeaders()
public void setIncludeHeaders(boolean includesHeaders)
includesHeaders
- true
if header values are included, false
otherwisepublic boolean isCaseInsensitive()
public void setCaseInsensitive(boolean isCaseInsensitive)
isCaseInsensitive
- true for case insensitive searches, false otherwisepublic CharSequence getSearchContent()
public void setSearchContent(CharSequence searchContent)
searchContent
- content soughtpublic boolean isFoundIn(InputStream input) throws IOException, org.apache.james.mime4j.MimeException
getSearchContent()
found in the given input?input
- InputStream
containing an emailIOException
org.apache.james.mime4j.MimeException
protected void handle(Exception e) throws IOException, org.apache.james.mime4j.MimeException
IOException
org.apache.james.mime4j.MimeException
public final org.slf4j.Logger getLogger()
public final void setLogger(org.slf4j.Logger logger)
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.