private String readScript ( File file ) throws IOException { if ( file == null ) return null ; StringBuilder script = new StringBuilder ( ) ; BufferedReader in = new BufferedReader ( new FileReader ( file ) ) ; try { String line ; while ( ( line = in . readLine ( ) ) != null ) { script . append ( line ) ; script . append ( "\n" ) ; } } finally { in . close ( ) ; } return script . toString ( ) ; }
Return the content of the specified script file as a String .