private static int nextChar(final Reader reader, final boolean ignoreWhitespace) throws IOException {
        int i = -1;
        while (true) {
            i = reader.read();
            if (i == -1) {
                return i;
            } else if (ignoreWhitespace) {
                if (!Character.isWhitespace((char) i)) {
                    return i;
                }
            } else {
                return i;
            }
        }
    }
Generate a unified diff of the two files using the specified number of lines of context.
The diff output is sent to system out in coloured form.

@return True if the files are the same
stroom-test-common/src/main/java/stroom/test/common/ComparisonHelper.java