Class MessageMatcher
- java.lang.Object
-
- org.apache.james.mime4j.utils.search.MessageMatcher
-
public class MessageMatcher extends Object
Searches an email for content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageMatcher.MessageMatcherBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageMatcher.MessageMatcherBuilderbuilder()protected voidhandle(Exception e)booleanisFoundIn(Reader reader, CharBuffer buffer)booleanmessageMatches(InputStream input)Is searchContents found in the given input?
-
-
-
Method Detail
-
builder
public static MessageMatcher.MessageMatcherBuilder builder()
-
messageMatches
public boolean messageMatches(InputStream input) throws IOException, MimeException
Is searchContents found in the given input?- Parameters:
input-InputStreamcontaining an email- Returns:
- true if the content exists and the stream contains the content, false otherwise. It takes the mime structure into account.
- Throws:
IOExceptionMimeException
-
handle
protected void handle(Exception e) throws IOException, MimeException
- Throws:
IOExceptionMimeException
-
isFoundIn
public boolean isFoundIn(Reader reader, CharBuffer buffer) throws IOException
- Throws:
IOException
-
-