private void reset() {
        if (builder != null) {
            // Reset the builder, detaching it from the constructed document.
            builder.reset();
            builder = null;

            handler = NullXMLFilter.INSTANCE;
        }
    }
Stops buffering SAX events and clears the buffer.
stroom-pipeline/src/main/java/stroom/pipeline/filter/TinyTreeBufferFilter.java