This method of the XMLOutputStream class closes the XMLOutputStream and frees any system resources that are associated with the stream.
public void close() throws IOException;
IOException if an I/O error occurs.