@Override public void close() throws IOException {
  if (writer == null) {
    encoding=defaultEncoding;
    writer=new OutputStreamWriter(out,encoding);
    writer.write(xmlPrologWriter.toString());
  }
  writer.close();
}

@ Override public void close ( ) throws IOException { if ( writer == null ) { encoding = defaultEncoding ; writer = new OutputStreamWriter ( out , encoding ) ; writer . write ( xmlPrologWriter . toString ( ) ) ; } writer . close ( ) ; }
close the underlying writer .
