This an API issue.
Since XMLTextInfosetOutputter doesn't have a flush() method of its own, then it needs to perform a flush() of the java.io.Writer that it is writing to, automatically.
I would suggest that on endDocument it should do a flush(). One can argue it should flush as part of endElement for complex elements as well, but at least on endDocument.
The absence of this flush() behavior caused one JAPI developer using Daffodil to waste time mystified about why she was getting 1/2 of an XML document out. Changing her code to just flush the writer after the return from parse() fixed it, but I think the API design really has to either flush automatically (my preference), or the XMLTextInfosetOutputter should have a flush() method of its own which flushes any state it has (today there is none), then flushes the writer it surrounds.