@Override
    public void endDocument() throws SAXException {
        try {
            // We return destinations here even though they would be returned
            // anyway in end processing because we want stepping mode to see
            // flushed output.
            returnDestinations();
        } finally {
            super.endDocument();
        }
    }
Joins text instances into a single text instance.
stroom-pipeline/src/main/java/stroom/pipeline/writer/TextWriter.java