public synchronized void close(){
  try {
    writer.close();
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
}

public synchronized void close ( ) { try { writer . close ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } }
closes the output writer .
