org.openi.util
Class Util

java.lang.Object
  extended by org.openi.util.Util

public class Util
extends java.lang.Object

Author:
Uddhab Pant Class contains common methods and fields.

Constructor Summary
Util()
           
 
Method Summary
static java.lang.String Document2String(org.w3c.dom.Document elem)
           
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

Document2String

public static java.lang.String Document2String(org.w3c.dom.Document elem)