org.apache.fop.render.rtf.rtflib.tools
Class ImageUtil
java.lang.Objectorg.apache.fop.render.rtf.rtflib.tools.ImageUtil
public class ImageUtil
extends java.lang.Object
Misc.utilities for images handling
This class belongs to the tag processing.
static boolean | compareHexValues(byte[] pattern, byte[] data, int searchAt, boolean searchForward)- Compares two hexadecimal values.
|
static int | getInt(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(String value)- Checks the string for percent character at the end of string.
|
compareHexValues
public static boolean compareHexValues(byte[] pattern,
byte[] data,
int searchAt,
boolean searchForward) Compares two hexadecimal values.
pattern - Targetdata - DatasearchAt - Position to start comparesearchForward - Direction to compare byte arrays
- true If equal
false If different
getInt
public static int getInt(String value)
Determines the digits from a string.
value - String with digits
- -1 There is no digit
number The digits as integer
getIntFromByteArray
public static int getIntFromByteArray(byte[] data,
int startAt,
int length,
boolean searchForward) Determines a integer value from a hexadecimal byte array.
data - ImagestartAt - Start index to read fromlength - Number of data elements to readsearchForward - True if searching forward, False if not (??)
isPercent
public static boolean isPercent(String value)
Checks the string for percent character at the end of string.
value - String with digits
- true The string contains a % value
false Other string
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.