Class ImageUtil
java.lang.Object
org.apache.fop.render.rtf.rtflib.tools.ImageUtil
Misc.utilities for images handling
This class belongs to the fo:external-graphic tag processing.
This work was originally authored by Andreas Putz
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareHexValues(byte[] pattern, byte[] data, int searchAt, boolean searchForward) Compares two hexadecimal values.static intDetermines the digits from a string.static intgetIntFromByteArray(byte[] data, int startAt, int length, boolean searchForward) Determines a integer value from a hexadecimal byte array.static booleanChecks the string for percent character at the end of string.
-
Method Details
-
getInt
Determines the digits from a string.- Parameters:
value- String with digits- Returns:
- -1 There is no digit number The digits as integer
-
isPercent
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 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- ImagestartAt- Start index to read fromlength- Number of data elements to readsearchForward- True if searching forward, False if not (??)- Returns:
- integer
-