void clear() {
        // Be ready to start matching from the start again.
        inputOffset = 0;
        // Reset the replacement count.
        replacementCount = 0;
        // Clear out buffer.
        outBuffer.clear();
        // Reset line number.
        lineNo = 1;
        // Reset column number.
        colNo = 0;
        // Allow replacements.
        allowReplacement = replacementCount != maxReplacements;
    }
Reads characters into an array.  This method will block until some input
is available, an I/O error occurs, or the end of the stream is reached.

@param cbuf Destination buffer
@return The number of characters read, or -1
if the end of the stream
has been reached
@throws IOException If an I/O error occurs
stroom-pipeline/src/main/java/stroom/pipeline/reader/FindReplaceFilter.java