The Memory Stream Connector can read from or write to any Java stream, but is most often used to write into memory, where the formatted data can be retrieved later. The allocated buffer is retrieved/accessed as needed.
The Connector can only operate in Iterator mode, AddOnly mode, or Passive state. The behavior of the Connector depends on the way it has been initialized.
var str = MM.connector.getDataBuffer();
// use str for something.
// To clear the data buffer and ready the Connector
for more output, re-initialize
MM.connector.initialize(null);