net.sf.jmatchparser.util
Class MaskedBinaryExpression
java.lang.Object
net.sf.jmatchparser.util.MaskedBinaryExpression
public class MaskedBinaryExpression
- extends Object
A BinaryExpression
that uses the secondary name "mask" in non-random
mode to specify a bit mask that is ANDed with the expression to test.
Optional bytes at the end of the mask mean that the string to match may also
be shorter. Optional bytes at other positions are invalid.
Alternatively, this class can match based on a regular expression, by using
regex:someRegex as the syntax. No additional transforms are
parsed in this case.
Method Summary |
boolean |
matches(byte[] value)
Test whether this expression matches the given bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaskedBinaryExpression
public MaskedBinaryExpression(String expression)
throws IOException
- Create a new masked binary expression.
- Throws:
IOException
matches
public boolean matches(byte[] value)
throws IOException
- Test whether this expression matches the given bytes.
- Throws:
IOException
Copyright © 2011. All Rights Reserved.