private void addCharacter(char c) {
                if (codepoint == -1) {
                    return;
                } else if ((codepoint & 0xFC00) == 0xD800) {
                    if ((c & 0xFC00) == 0xDC00) {
                        codepoint = (codepoint << 10) + c + SURROGATE_OFFSET;
                    } else {
                        codepoint = -1;
                    }
                } else if (codepoint == -2) {
                    codepoint = c;
                } else {
                    codepoint = -1;
                }
            }
@see nu.validator.datatype.AbstractDatatype#createStreamingValidator(org.relaxng.datatype.ValidationContext)
src/nu/validator/datatype/AbstractUnicodeClassCharacter.java