private void copyBuffer(int length) {
        if (length > 0) {
            final CharSequence charSequence = inBuffer.subSequence(0, length);
            outBuffer.append(charSequence, 0, charSequence.length());
            move(charSequence.length());
        }
    }
Read text into the input buffer, replace the first match if possible and copy replaced text to the output buffer.
stroom-pipeline/src/main/java/stroom/pipeline/reader/FindReplaceFilter.java