Flush Method
Flushes the XML/JSON content that has been written so far.
Syntax
public String flush();
Remarks
This method returns all of the XML or JSON content that has been written since the last call to Flush or Reset and clears the internal buffer.
The following methods can be used to write XML content:
The following methods can be used to write JSON content:
Note that you may only write either XML or JSON content at one time; if you need to switch, you must call Flush in between.