Class MultiByteCharMatcher

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(byte b)
      Adds the next contiguous byte to this matcher
      boolean endSequence()
      Tells the matcher that there are no more contiguous bytes.
      Sequence getSequence()
      Returns the currently recognized sequence which only exists immediately after an add or end sequence is called with a return value of true.
      void reset()
      Resets the internal state of this ByteMatcher so that it can be reused against another byte stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiByteCharMatcher

        public MultiByteCharMatcher​(int minLength,
                                    CharSetRecognizer charSet,
                                    CharWidth charWidth,
                                    Endian endian,
                                    int alignment,
                                    int offset)
    • Method Detail

      • add

        public boolean add​(byte b)
        Description copied from interface: ByteStreamCharMatcher
        Adds the next contiguous byte to this matcher
        Specified by:
        add in interface ByteStreamCharMatcher
        Parameters:
        b - the next contiguous byte in the search stream.
        Returns:
        true if the given byte triggered a sequence match. Note that this byte may not be a part of the recognized sequence.
      • getSequence

        public Sequence getSequence()
        Description copied from interface: ByteStreamCharMatcher
        Returns the currently recognized sequence which only exists immediately after an add or end sequence is called with a return value of true.
        Specified by:
        getSequence in interface ByteStreamCharMatcher
        Returns:
      • endSequence

        public boolean endSequence()
        Description copied from interface: ByteStreamCharMatcher
        Tells the matcher that there are no more contiguous bytes. If the current state of the matcher is such that there is a valid sequence that can be at the end of the stream, then a sequence will be created and true will be returned.
        Specified by:
        endSequence in interface ByteStreamCharMatcher
        Returns:
        true if there is a valid sequence at the end of the stream.
      • reset

        public void reset()
        Description copied from interface: ByteStreamCharMatcher
        Resets the internal state of this ByteMatcher so that it can be reused against another byte stream.
        Specified by:
        reset in interface ByteStreamCharMatcher