Package ghidra.util.ascii
Class MultiByteCharMatcher
java.lang.Object
ghidra.util.ascii.MultiByteCharMatcher
- All Implemented Interfaces:
ByteStreamCharMatcher
-
Constructor Summary
ConstructorsConstructorDescriptionMultiByteCharMatcher(int minLength, CharSetRecognizer charSet, CharWidth charWidth, Endian endian, int alignment, int offset) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte b) Adds the next contiguous byte to this matcherbooleanTells the matcher that there are no more contiguous bytes.Returns the currently recognized sequence which only exists immediately after an add or end sequence is called with a return value of true.voidreset()Resets the internal state of this ByteMatcher so that it can be reused against another byte stream.
-
Constructor Details
-
MultiByteCharMatcher
public MultiByteCharMatcher(int minLength, CharSetRecognizer charSet, CharWidth charWidth, Endian endian, int alignment, int offset)
-
-
Method Details
-
add
public boolean add(byte b) Description copied from interface:ByteStreamCharMatcherAdds the next contiguous byte to this matcher- Specified by:
addin interfaceByteStreamCharMatcher- 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
Description copied from interface:ByteStreamCharMatcherReturns the currently recognized sequence which only exists immediately after an add or end sequence is called with a return value of true.- Specified by:
getSequencein interfaceByteStreamCharMatcher- Returns:
-
endSequence
public boolean endSequence()Description copied from interface:ByteStreamCharMatcherTells 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:
endSequencein interfaceByteStreamCharMatcher- Returns:
- true if there is a valid sequence at the end of the stream.
-
reset
public void reset()Description copied from interface:ByteStreamCharMatcherResets the internal state of this ByteMatcher so that it can be reused against another byte stream.- Specified by:
resetin interfaceByteStreamCharMatcher
-