This method of the XMLOutputStream class flushes the XMLOutputStream.
public void flush() throws IOException;
IOException if an I/O error occurred.