public void flush() throws IOException {
   writer.flush();
 }