public void resetFromFile ( String configFile ) throws IOException { IStringBuffer isb = new IStringBuffer ( ) ; String line = null ; BufferedReader reader = new BufferedReader ( new FileReader ( configFile ) ) ; while ( ( line = reader . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . equals ( "" ) ) continue ; if ( line . charAt ( 0 ) == ' ' ) continue ; isb . append ( line ) . append ( ' ' ) ; line = null ; //let gc do its work } globalConfig = new JSONObject ( isb . toString ( ) ) ; //let gc do its work isb = null ; reader . close ( ) ; reader = null ; }
initialize it from the specified config file