Interface BytePattern

All Known Implementing Classes:
DittedBitSequence, GenericByteSequencePattern, Pattern

public interface BytePattern
Interface for Patterns that can be combined into a single state machine that can be simultaneously searched for in a byte sequence.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the size of this pattern..
    boolean
    isMatch(int patternOffset, int byteValue)
    Checks if this pattern matches a byte value at a specific offset into the pattern.
  • Method Details

    • getSize

      int getSize()
      Returns the size of this pattern..
      Returns:
      the size of this pattern.
    • isMatch

      boolean isMatch(int patternOffset, int byteValue)
      Checks if this pattern matches a byte value at a specific offset into the pattern.
      Parameters:
      patternOffset - the position in the pattern to check if it matches the given byte value
      byteValue - the byte value to check if it matches the pattern at the given offset. This value is passed as an int so that the byte can be treated as unsigned.
      Returns:
      true if this pattern matches the given byte value at the given pattern offset.