-
public class ImageFormatCheckerUtilsImageFormatChecker utility methods
-
-
Method Summary
Modifier and Type Method Description static Array<byte>asciiBytes(String value)Helper method that transforms provided string into it's byte representation using ASCIIencoding. static booleanstartsWithPattern(Array<byte> byteArray, Array<byte> pattern)Checks if byteArray interpreted as sequence of bytes starts with pattern starting at positionequal to offset. static booleanhasPatternAt(Array<byte> byteArray, Array<byte> pattern, int offset)Checks if byteArray interpreted as sequence of bytes starts with pattern starting at positionequal to offset. static intindexOfPattern(Array<byte> byteArray, int byteArrayLen, Array<byte> pattern, int patternLen)Checks if byteArray interpreted as sequence of bytes contains the pattern. -
-
Method Detail
-
asciiBytes
static Array<byte> asciiBytes(String value)
Helper method that transforms provided string into it's byte representation using ASCIIencoding.
- Parameters:
value- the string to use
-
startsWithPattern
static boolean startsWithPattern(Array<byte> byteArray, Array<byte> pattern)
Checks if byteArray interpreted as sequence of bytes starts with pattern starting at positionequal to offset.
- Parameters:
byteArray- the byte array to be checkedpattern- the pattern to check
-
hasPatternAt
static boolean hasPatternAt(Array<byte> byteArray, Array<byte> pattern, int offset)
Checks if byteArray interpreted as sequence of bytes starts with pattern starting at positionequal to offset.
- Parameters:
byteArray- the byte array to be checkedpattern- the pattern to check
-
indexOfPattern
static int indexOfPattern(Array<byte> byteArray, int byteArrayLen, Array<byte> pattern, int patternLen)
Checks if byteArray interpreted as sequence of bytes contains the pattern.
- Parameters:
byteArray- the byte array to be checkedpattern- the pattern to check
-
-
-
-