package edu.wustl.common.util.global;


import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ResourceBundle;

public class CommonFileReader {

	/**
	 * @param args
	 */
	public String readData(String fileName)
	{
		StringBuffer buffer = new StringBuffer();
		try
		{

			String file = Variables.catissueHome +System.getProperty("file.separator") + fileName;
			BufferedReader br = new BufferedReader(new FileReader(file));
			String line = "";
			while((line = br.readLine())!= null)
			{
				//buffer.append(line+System.getProperty("line.separator"));
				buffer.append(line+"<br>");
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return buffer.toString();
	}
	
	public String getFileName(String key)
	{
		ResourceBundle myResources =ResourceBundle.getBundle("ApplicationResources");
		String fileName = myResources.getString(key);
		return fileName;
		
	}

}

@@ -99,42 +99,8 @@
 er;%0D
-%0Aimport java.util.ResourceBundle;%0D
 %0A%0D%0Ap
@@ -265,21 +265,96 @@
 y%0D%0A%09%09%7B%0D%0A
+//%09%09%09Logger.out.debug(%22filename..............................%22+fileName);
 %0D%0A%09%09%09
+//
 String f
@@ -494,16 +494,20 @@
 der(file
+Name
 ));%0D%0A%09%09%09
@@ -738,16 +738,72 @@
 ;%0D%0A%09%09%7D%0D%0A
+%09%09%0D%0A%09%09System.out.println(%22Data : %22+buffer.toString());%0D%0A
 %09%09return
@@ -830,16 +830,18 @@
 %0A%09%7D%0D%0A%09%0D%0A
+//
 %09public 
@@ -872,20 +872,24 @@
 g key)%0D%0A
+//
 %09%7B%0D%0A
+//
 %09%09Resour
@@ -910,16 +910,17 @@
 ources =
+ 
 Resource
@@ -962,16 +962,18 @@
 ces%22);%0D%0A
+//
 %09%09String
@@ -1009,24 +1009,26 @@
 ring(key);%0D%0A
+//
 %09%09return fil
@@ -1035,20 +1035,224 @@
 eName;%0D%0A
+//
 %09%09%0D%0A
+//%09%7D%0D%0A%09%0D%0A//%09public static void main(String%5B%5D args)%0D%0A//%09%7B%0D%0A//%09%09CommonFileReader com = new CommonFileReader();%0D%0A//%09%09com.readData(%22C:/jboss-4.0.2/server/default/catissuecore-properties/ContactUs.txt%22);%0D%0A//
 %09%7D%0D%0A%0D%0A%7D%0D

Handling the path of the file being read.