public class PStringType extends StringType
StringType.TestInfo
MagicMatcher.MutableOffset
EMPTY
Constructor and Description |
---|
PStringType() |
Modifier and Type | Method and Description |
---|---|
Object |
extractValueFromBytes(int offset,
byte[] bytes,
boolean required)
Extracted value is the extracted string using the first byte as the length.
|
Object |
isMatch(Object testValue,
Long andValue,
boolean unsignedType,
Object extractedValue,
MagicMatcher.MutableOffset mutableOffset,
byte[] bytes)
Matches if the bytes match at a certain offset.
|
convertTestString, findOffsetMatch, getStartingBytes, renderValue
public Object extractValueFromBytes(int offset, byte[] bytes, boolean required)
extractValueFromBytes
in interface MagicMatcher
extractValueFromBytes
in class StringType
offset
- Number of bytes into the bytes array that we are extracting from.bytes
- Array of bytes we are extracting from.required
- Whether or not the extracted value is required for later. If it is not then the type may opt to not
extract the value and to do the matching directly.MagicMatcher.isMatch(Object, Long, boolean, Object, MutableOffset, byte[])
or null
if not enough bytes.public Object isMatch(Object testValue, Long andValue, boolean unsignedType, Object extractedValue, MagicMatcher.MutableOffset mutableOffset, byte[] bytes)
MagicMatcher
isMatch
in interface MagicMatcher
isMatch
in class StringType
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.