public String loadConfigurationFromFile(String fileName) throws IOException {
  StringBuilder sb=new StringBuilder(256);
  String s;
  try (BufferedReader br=new BufferedReader(new FileReader(fileName))){
    while ((s=br.readLine()) != null) {
      sb.append(s);
    }
  }
   return sb.toString();
}

public String loadConfigurationFromFile ( String fileName ) throws IOException { StringBuilder sb = new StringBuilder ( 256 ) ; String s ; try ( BufferedReader br = new BufferedReader ( new FileReader ( fileName ) ) ) { while ( ( s = br . readLine ( ) ) != null ) { sb . append ( s ) ; } } return sb . toString ( ) ; }
loads a configuration from the specified filename
