/usr/java/lib/xflow1.2.1/tests/xflow/TestUtilities.java

1    package xflow; 
2     
3    import java.io.BufferedReader; 
4    import java.io.FileReader; 
5    import java.io.IOException; 
6     
7    /** 
8     * User: kosta 
9     * Date: Jun 28, 2004 
10    * Time: 12:44:59 AM 
11    */ 
12   public class TestUtilities { 
13    
14     public static String readFileContent( String fileName ) throws IOException { 
15       BufferedReader in = new BufferedReader(new FileReader(fileName)); 
16       StringBuffer content = new StringBuffer(); 
17       String str; 
18       while ((str = in.readLine()) != null) { 
19         content.append( str ); 
20       } 
21       in.close(); 
22       return content.toString(); 
23     } 
24   } 
25