@Override
    public void endDocument() throws SAXException {
        if (buffer) {
            events.add(new EndDocument());
        } else {
            super.endDocument();
        }
    }
Buffers a endDocument event if buffer is set to true.

@throws SAXException Not thrown.
@see stroom.pipeline.filter.AbstractXMLFilter#endDocument()
stroom-pipeline/src/test/java/stroom/pipeline/util/BufferFilter.java