@Override
    public void endStream() {
        try {
            super.endStream();
        } finally {
            // Make sure there is no further allocation of the buffer.
            handler = null;
        }
    }
This method tells filters that a stream has finished parsing so cleanup
can be performed.
stroom-pipeline/src/main/java/stroom/pipeline/filter/BufferFilter.java