public int read(java.nio.CharBuffer target) throws IOException {
        final int len = target.remaining();
        final char[] cbuf = new char[len];
        final int n = read(cbuf, 0, len);
        if (n > 0) {
            target.put(cbuf, 0, n);
        }
        return n;
    }
Attempts to read characters into the specified character buffer.
The buffer is used as a repository of characters as-is: the only
changes made are the results of a put operation. No flipping or
rewinding of the buffer is performed.

@param target the buffer to read characters into
@return The number of characters added to the buffer, or
-1 if this source of characters is at its end
@throws IOException                      if an I/O error occurs
@throws NullPointerException             if target is null
@throws java.nio.ReadOnlyBufferException if target is a read only buffer
@since 1.5
stroom-pipeline/src/main/java/stroom/pipeline/reader/FindReplaceFilter.java