private void load ( InputStream is ) { try { BufferedReader reader = new BufferedReader ( new InputStreamReader ( is ) ) ; for ( String line = reader . readLine ( ) ; line != null ; line = reader . readLine ( ) ) { String [ ] tok = line . split ( DELIM ) ; if ( tok . length >= 3 ) { addEntry ( tok [ 0 ] , Integer . parseInt ( tok [ 1 ] ) , convertContext ( tok [ 2 ] ) ) ; } } reader . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; context = null ; score = null ; } }
Reads data from the input stream and loads itself .