public static boolean isIPv6(final String addr) {
        try {
            return InetAddress.getByName(addr).getAddress().length == IPV6_ADDRESS_LENGTH;
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
    }
check whether the ip address is IPv6.

@param addr ip address
@return boolean
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Utils.java