@Override public Codepoint next() throws InvalidCharacterException { Codepoint cp = super.next(); int v = cp.getValue(); if (v != -1 && check(v)) { if (scanningOnly) { position(position() - 1); return null; } else throw new InvalidCharacterException(v); } return cp; }