private void loadText(InputStream is) throws IOException {
  BufferedReader reader;
  String line;
  String tokenize=Utilities.getProperty("com.sun.speech.freetts.lexicon.LTSTokenize","load");
  tokenizeOnLoad=tokenize.equals("load");
  tokenizeOnLookup=tokenize.equals("lookup");
  letterIndex=new HashMap();
  reader=new BufferedReader(new InputStreamReader(is));
  line=reader.readLine();
  while (line != null) {
    if (!line.startsWith("***")) {
      parseAndAdd(line);
    }
    line=reader.readLine();
  }
}

private void loadText ( InputStream is ) throws IOException { BufferedReader reader ; String line ; String tokenize = Utilities . getProperty ( "com.sun.speech.freetts.lexicon.LTSTokenize" , "load" ) ; tokenizeOnLoad = tokenize . equals ( "load" ) ; tokenizeOnLookup = tokenize . equals ( "lookup" ) ; letterIndex = new HashMap ( ) ; reader = new BufferedReader ( new InputStreamReader ( is ) ) ; line = reader . readLine ( ) ; while ( line != null ) { if ( ! line . startsWith ( "***" ) ) { parseAndAdd ( line ) ; } line = reader . readLine ( ) ; } }
loads the lts rules from the given text input stream . the stream is not closed after the rules are read .
