private String openFile(String file){
  BufferedReader br=null;
  try {
    br=new BufferedReader(new FileReader(file));
    StringBuffer sb=new StringBuffer(5000);
    String temp;
    while ((temp=br.readLine()) != null) {
      sb.append(temp);
    }
    return sb.toString();
  }
 catch (  FileNotFoundException fnf) {
    debug.error("FedletConfigurationImpl.getConfiguration: " + file + " for component "+ componentName,fnf);
    return null;
  }
catch (  IOException ioe) {
    debug.error("FedletConfigurationImpl.getConfiguration:" + file + " for component "+ componentName,ioe);
    return null;
  }
 finally {
    if (br != null) {
      try {
        br.close();
      }
 catch (      IOException ioe) {
      }
    }
  }
}

private String openFile ( String file ) { BufferedReader br = null ; try { br = new BufferedReader ( new FileReader ( file ) ) ; StringBuffer sb = new StringBuffer ( 5000 ) ; String temp ; while ( ( temp = br . readLine ( ) ) != null ) { sb . append ( temp ) ; } return sb . toString ( ) ; } catch ( FileNotFoundException fnf ) { debug . error ( "FedletConfigurationImpl.getConfiguration: " + file + " for component " + componentName , fnf ) ; return null ; } catch ( IOException ioe ) { debug . error ( "FedletConfigurationImpl.getConfiguration:" + file + " for component " + componentName , ioe ) ; return null ; } finally { if ( br != null ) { try { br . close ( ) ; } catch ( IOException ioe ) { } } } }
returns the content of a file as string . returns null if error occurs .
