protected boolean shouldEncodeChar(char c) {
        int max = getMaximumAllowedCharacter();
        return max > 0 && c > max;
    }
Should the given character be escaped. This depends on the
encoding of the document.
@param c the character to check
@return {@code true} to escape the character, otherwise {@code false}
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java