public void read(BufferedReader reader) throws Exception {
  String line;
  clear();
  while ((line=reader.readLine()) != null) {
    line=line.trim();
    if (line.startsWith("#")) {
      continue;
    }
    add(line);
  }
  reader.close();
}

public void read ( BufferedReader reader ) throws Exception { String line ; clear ( ) ; while ( ( line = reader . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . startsWith ( "#" ) ) { continue ; } add ( line ) ; } reader . close ( ) ; }
generates a new stopwords object from the reader . the reader is closed automatically .
