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 class
MessageMatcher.MessageMatcherBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageMatcher.MessageMatcherBuilder
builder()
protected void
handle(Exception e)
boolean
isFoundIn(Reader reader, CharBuffer buffer)
boolean
messageMatches(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
-InputStream
containing an email- Returns:
- true if the content exists and the stream contains the content, false otherwise. It takes the mime structure into account.
- Throws:
IOException
MimeException
-
handle
protected void handle(Exception e) throws IOException, MimeException
- Throws:
IOException
MimeException
-
isFoundIn
public boolean isFoundIn(Reader reader, CharBuffer buffer) throws IOException
- Throws:
IOException
-
-