org.openi.util
Class Util

java.lang.Object
  extended byorg.openi.util.Util

public class Util
extends java.lang.Object

Version:
$Revision: 1.1.1.2 $ $Date: 2005/07/11 17:58:37 $ Class contains common methods and fields.
Author:
Uddhab Pant

Constructor Summary
Util()
           
 
Method Summary
static java.lang.String getFileContents(java.lang.String fileNamePath)
          Fetch the entire contents of a text file, and return it in a String.
static boolean isItemInList(java.lang.String item, java.lang.String items)
          Checks whether the item is in comma separated list of items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

isItemInList

public static boolean isItemInList(java.lang.String item,
                                   java.lang.String items)
Checks whether the item is in comma separated list of items.

Parameters:
item - String
items - String
Returns:
boolean

getFileContents

public static java.lang.String getFileContents(java.lang.String fileNamePath)
                                        throws java.io.FileNotFoundException,
                                               java.io.IOException
Fetch the entire contents of a text file, and return it in a String.

Parameters:
fileNamePath - is a file name including path which already exists and can be read.
Returns:
String
Throws:
java.io.FileNotFoundException
java.io.IOException