static public String textRead(String a_file_name)
			   throws FileNotFoundException, IOException
		{
			 // for holding the string read from the file
			 StringBuffer contents = new StringBuffer();

			 // for holding the reader; to make visible to finally clause
			 BufferedReader input_reader = null;
			 try
			 {
			     // 1. get the file handle
			     FileReader input_file_reader = new FileReader(a_file_name);
			 	 // 2. get the buffered reader handle
			     input_reader = new BufferedReader(input_file_reader);

			     String line = null;

			     // keep on reading each line in the file until you read null
			     // i.e until you reach the end of the file
			     while (( line = input_reader.readLine()) != null)
			     {
			         contents.append(line);
			         contents.append(System.getProperty("line.separator"));
			     }
			 } // end try

			 catch (FileNotFoundException ex)
			 {
			       ex.printStackTrace();
			 }
			 catch (IOException ex)
			 {
			       ex.printStackTrace();
			 }
			 finally
			 {
			      try
			      {
			         if (input_reader!= null)
 			           input_reader.close();
			       }
			       catch (IOException ex)
			       {
			         ex.printStackTrace();
			       }
			 }
             return contents.toString();
        }