@Override
 public void flush() throws IOException {
   if (writer != null) {
     writer.flush();
   }
 }