public void write ( BufferedWriter writer ) throws Exception { Enumeration enm ; // header writer . write ( "# generated " + new Date ( ) ) ; writer . newLine ( ) ; enm = elements ( ) ; while ( enm . hasMoreElements ( ) ) { writer . write ( enm . nextElement ( ) . toString ( ) ) ; writer . newLine ( ) ; } writer . flush ( ) ; writer . close ( ) ; }
Writes the current stopwords to the given writer . The writer is closed automatically .