public int read()

in src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java [105:122]


        public int read(char[] cbuf, int off, int len) throws IOException {
            int count = super.read(cbuf, off, len);

            if (!filter) {
                return count;
            }

            if (count != -1) {
                for (int i = off; i < off + count; i++) {
                    if (cbuf[i] == BOM) {
                        // shift the content one char to the left
                        System.arraycopy(cbuf, i + 1, cbuf, i, off + count - 1 - i);
                        count--;
                    }
                }
            }
            return count;
        }