|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.Utilities
public class Utilities
A collection of convenience methods that were present in many different iText classes.
| Constructor Summary | |
|---|---|
Utilities()
|
|
| Method Summary | |
|---|---|
static Object[][] |
addToArray(Object[][] original,
Object[] item)
Utility method to extend an array. |
static boolean |
checkTrueOrFalse(Properties attributes,
String key)
Checks for a true/false value of a key in a Properties object. |
static String |
convertFromUtf32(int codePoint)
Converts a UTF32 code point value to a String with the corresponding character(s). |
static int |
convertToUtf32(char[] text,
int idx)
Converts a unicode character in a character array to a UTF 32 code point value. |
static int |
convertToUtf32(char highSurrogate,
char lowSurrogate)
Returns the code point of a UTF32 character corresponding with a high and a low surrogate value. |
static int |
convertToUtf32(String text,
int idx)
Converts a unicode character in a String to a UTF32 code point value |
static Set |
getKeySet(Hashtable table)
Gets the keys of a Hashtable |
static float |
inchesToMillimeters(float value)
Measurement conversion from inches to millimeters. |
static float |
inchesToPoints(float value)
Measurement conversion from inches to points. |
static boolean |
isSurrogateHigh(char c)
Check if the value of a character belongs to a certain interval that indicates it's the higher part of a surrogate pair. |
static boolean |
isSurrogateLow(char c)
Check if the value of a character belongs to a certain interval that indicates it's the lower part of a surrogate pair. |
static boolean |
isSurrogatePair(char[] text,
int idx)
Checks if two subsequent characters in a character array are are the higher and the lower character in a surrogate pair (and therefore eligible for conversion to a UTF 32 character). |
static boolean |
isSurrogatePair(String text,
int idx)
Checks if two subsequent characters in a String are are the higher and the lower character in a surrogate pair (and therefore eligible for conversion to a UTF 32 character). |
static float |
millimetersToInches(float value)
Measurement conversion from millimeters to inches. |
static float |
millimetersToPoints(float value)
Measurement conversion from millimeters to points. |
static float |
pointsToInches(float value)
Measurement conversion from points to inches. |
static float |
pointsToMillimeters(float value)
Measurement conversion from points to millimeters. |
static void |
skip(InputStream is,
int size)
This method is an alternative for the InputStream.skip()
-method that doesn't seem to work properly for big values of size
. |
static URL |
toURL(String filename)
This method makes a valid URL from a given filename. |
static String |
unEscapeURL(String src)
Unescapes an URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utilities()
| Method Detail |
|---|
public static Set getKeySet(Hashtable table)
table - a Hashtable
public static Object[][] addToArray(Object[][] original,
Object[] item)
original - the original array or nullitem - the item to be added to the array
public static boolean checkTrueOrFalse(Properties attributes,
String key)
attributes - key -
public static String unEscapeURL(String src)
src - the url to unescape
public static URL toURL(String filename)
throws MalformedURLException
This method makes the conversion of this library from the JAVA 2 platform to a JDK1.1.x-version easier.
filename - a given filename
MalformedURLException
public static void skip(InputStream is,
int size)
throws IOException
InputStream.skip()
-method that doesn't seem to work properly for big values of size
.
is - the InputStreamsize - the number of bytes to skip
IOExceptionpublic static final float millimetersToPoints(float value)
value - a value in millimeters
public static final float millimetersToInches(float value)
value - a value in millimeters
public static final float pointsToMillimeters(float value)
value - a value in points
public static final float pointsToInches(float value)
value - a value in points
public static final float inchesToMillimeters(float value)
value - a value in inches
public static final float inchesToPoints(float value)
value - a value in inches
public static boolean isSurrogateHigh(char c)
c - the character
public static boolean isSurrogateLow(char c)
c - the character
public static boolean isSurrogatePair(String text,
int idx)
text - the String with the high and low surrogate charactersidx - the index of the 'high' character in the pair
public static boolean isSurrogatePair(char[] text,
int idx)
text - the character array with the high and low surrogate charactersidx - the index of the 'high' character in the pair
public static int convertToUtf32(char highSurrogate,
char lowSurrogate)
highSurrogate - the high surrogate valuelowSurrogate - the low surrogate value
public static int convertToUtf32(char[] text,
int idx)
text - a character array that has the unicode character(s)idx - the index of the 'high' character
public static int convertToUtf32(String text,
int idx)
text - a String that has the unicode character(s)idx - the index of the 'high' character
public static String convertFromUtf32(int codePoint)
codePoint - a Unicode value
|
Hosted by Hostbasket | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||