public class MessageMatcher
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageMatcher.MessageMatcherBuilder |
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.String> |
contentTypes |
private boolean |
ignoringMime |
private boolean |
includeHeaders |
private boolean |
isCaseInsensitive |
private org.slf4j.Logger |
logger |
private java.util.List<java.lang.CharSequence> |
searchContents |
| Modifier | Constructor and Description |
|---|---|
private |
MessageMatcher(java.util.List<java.lang.CharSequence> searchContents,
boolean isCaseInsensitive,
boolean includeHeaders,
boolean ignoringMime,
java.util.List<java.lang.String> contentTypes,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static MessageMatcher.MessageMatcherBuilder |
builder() |
private boolean |
checkBody(java.nio.CharBuffer buffer,
MimeTokenStream parser) |
private boolean |
checkHeader(java.nio.CharBuffer buffer,
MimeTokenStream parser) |
private char |
computeNextChar(boolean isCaseInsensitive,
char read) |
private java.nio.CharBuffer |
createBuffer(java.lang.CharSequence searchContent) |
protected void |
handle(java.lang.Exception e) |
boolean |
isFoundIn(java.io.Reader reader,
java.nio.CharBuffer buffer) |
private boolean |
matchBufferInMailBeingMimeAware(java.io.InputStream input,
java.nio.CharBuffer buffer) |
private boolean |
matches(java.nio.CharBuffer buffer,
char next) |
boolean |
messageMatches(java.io.InputStream input)
Is searchContents found in the given input?
|
private final org.slf4j.Logger logger
private final java.util.List<java.lang.CharSequence> searchContents
private final java.util.List<java.lang.String> contentTypes
private final boolean isCaseInsensitive
private final boolean includeHeaders
private final boolean ignoringMime
private MessageMatcher(java.util.List<java.lang.CharSequence> searchContents,
boolean isCaseInsensitive,
boolean includeHeaders,
boolean ignoringMime,
java.util.List<java.lang.String> contentTypes,
org.slf4j.Logger logger)
public static MessageMatcher.MessageMatcherBuilder builder()
public boolean messageMatches(java.io.InputStream input)
throws java.io.IOException,
MimeException
input - InputStream containing an emailjava.io.IOExceptionMimeExceptionprivate boolean matchBufferInMailBeingMimeAware(java.io.InputStream input,
java.nio.CharBuffer buffer)
throws java.io.IOException,
MimeException
java.io.IOExceptionMimeExceptionprivate boolean checkHeader(java.nio.CharBuffer buffer,
MimeTokenStream parser)
throws java.io.IOException
java.io.IOExceptionprivate boolean checkBody(java.nio.CharBuffer buffer,
MimeTokenStream parser)
throws java.io.IOException
java.io.IOExceptionprivate java.nio.CharBuffer createBuffer(java.lang.CharSequence searchContent)
protected void handle(java.lang.Exception e)
throws java.io.IOException,
MimeException
java.io.IOExceptionMimeExceptionpublic boolean isFoundIn(java.io.Reader reader,
java.nio.CharBuffer buffer)
throws java.io.IOException
java.io.IOExceptionprivate char computeNextChar(boolean isCaseInsensitive,
char read)
private boolean matches(java.nio.CharBuffer buffer,
char next)