Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text
Class Utilities

    java.lang.Object
      com.lowagie.text.Utilities

    public class Utilities

extends Object

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 Set` | `getKeySet(Hashtable table)` Gets the keys of a Hashtable
`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

### Utilities

    public Utilities()

Method Detail

### getKeySet

    public static Set getKeySet(Hashtable table)

  Gets the keys of a Hashtable

  Parameters:
    `table` - a Hashtable
  Returns:
    the keyset of a Hashtable (or an empty set if table is null)

### addToArray

    public static Object[][] addToArray(Object[][] original,
                                        Object[] item)

  Utility method to extend an array.

  Parameters:
    `original` - the original array or `null`
    `item` - the item to be added to the array
  Returns:
    a new array with the item appended

### checkTrueOrFalse

    public static boolean checkTrueOrFalse(Properties attributes,
                                           String key)

  Checks for a true/false value of a key in a Properties object.

  Parameters:
    `attributes` -
    `key` -
  Returns:
    a true/false value of a key in a Properties object

### unEscapeURL

    public static String unEscapeURL(String src)

  Unescapes an URL. All the "%xx" are replaced by the 'xx' hex char value.

  Parameters:
    `src` - the url to unescape
  Returns:
    the eunescaped value

### toURL

    public static URL toURL(String filename)
                     throws MalformedURLException

  This method makes a valid URL from a given filename.

  This method makes the conversion of this library from the JAVA 2 platform to a JDK1.1.x-version easier.

  Parameters:
    `filename` - a given filename
  Returns:
    a valid URL
  Throws:
    `MalformedURLException`

### skip

    public static void skip(InputStream is,
                            int size)
                     throws IOException

  This method is an alternative for the `InputStream.skip()` -method that doesn't seem to work properly for big values of `size` .

  Parameters:
    `is` - the `InputStream`
    `size` - the number of bytes to skip
  Throws:
    `IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD