org.jfor.jfor.tools
Class ImageUtil
java.lang.Object
org.jfor.jfor.tools.ImageUtil
- public class ImageUtil
- extends java.lang.Object
Misc.utilities for images handling
This class belongs to the tag processing.
- Author:
- Andreas Putz
Method Summary |
static boolean |
compareHexValues(byte[] pattern,
byte[] data,
int searchAt,
boolean searchForward)
Compares two hexadecimal values. |
static int |
getInt(java.lang.String value)
Determines the digits from a string. |
static int |
getIntFromByteArray(byte[] data,
int startAt,
int length,
boolean searchForward)
Determines a integer value from a hexadecimal byte array. |
static boolean |
isPercent(java.lang.String value)
Checks the string for percent character at the end of string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInt
public static int getInt(java.lang.String value)
- Determines the digits from a string.
- Parameters:
value
- String with digits
- Returns:
- -1 There is no digit\n
number The digits as integer
isPercent
public static boolean isPercent(java.lang.String value)
- Checks the string for percent character at the end of string.
- Parameters:
value
- String with digits
- Returns:
- true The string contains a % value
false Other string
compareHexValues
public static boolean compareHexValues(byte[] pattern,
byte[] data,
int searchAt,
boolean searchForward)
- Compares two hexadecimal values.
- Parameters:
pattern
- Targetdata
- DatasearchAt
- Position to start comparesearchForward
- Direction to compare byte arrays
- Returns:
- true If equal\n
false If different
getIntFromByteArray
public static int getIntFromByteArray(byte[] data,
int startAt,
int length,
boolean searchForward)
- Determines a integer value from a hexadecimal byte array.
- Parameters:
data
- Image
- Returns:
- A number