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

## com.sun.syndication.propono.utils
Class Utilities

    java.lang.Object
      com.sun.syndication.propono.utils.Utilities

    public class Utilities

extends Object

Utilities for file I/O and string manipulation.

Constructor Summary
`Utilities()`

Method Summary
`static void` | `copyInputToOutput(InputStream input, OutputStream output)` Copy input stream to output stream using 8K buffer.
`static byte[]` | `getBytesFromFile(File file)` Returns the contents of the file in a byte array (from JavaAlmanac).
`static String` | `replaceNonAlphanumeric(String str, char subst)` Replaces occurences of non-alphanumeric characters with a supplied char.
`static String` | `streamToString(InputStream is)` Read input from stream and into string.
`static String` | `stringArrayToString(String[] stringArray, String delim)` Convert string array to string.
`static String[]` | `stringToStringArray(String instr, String delim)` Convert string to string array.

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

### getBytesFromFile

    public static byte[] getBytesFromFile(File file)
                                   throws IOException

  Returns the contents of the file in a byte array (from JavaAlmanac).

  Throws:
    `IOException`

### streamToString

    public static String streamToString(InputStream is)
                                 throws IOException

  Read input from stream and into string.

  Throws:
    `IOException`

### copyInputToOutput

    public static void copyInputToOutput(InputStream input,
                                         OutputStream output)
                                  throws IOException

  Copy input stream to output stream using 8K buffer.

  Throws:
    `IOException`

### replaceNonAlphanumeric

    public static String replaceNonAlphanumeric(String str,
                                                char subst)

  Replaces occurences of non-alphanumeric characters with a supplied char.

### stringToStringArray

    public static String[] stringToStringArray(String instr,
                                               String delim)
                                        throws NoSuchElementException,
                                               NumberFormatException

  Convert string to string array.

  Throws:
    `NoSuchElementException`
    `NumberFormatException`

### stringArrayToString

    public static String stringArrayToString(String[] stringArray,
                                             String delim)

  Convert string array to string.

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