private void error(final String error) {
        // Allow no further replacements for this input.
        allowReplacement = false;

        // Log the error.
        if (errorReceiver != null) {
            Location location = null;
            if (locationFactory != null) {
                location = locationFactory.create(lineNo, colNo);
            }
            errorReceiver.log(Severity.ERROR, location, elementId, error, null);
        }
    }
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