question: public void flush ( ) throws Exception { buffer . write ( result ) ; buffer . clear ( ) ; result . flush ( ) ; }
target:  This is used to flush the writer when the XML if it has been buffered. The flush method is used by the node writer after an end element has been written. Flushing ensures that buffering does not affect the result of the node writer.