List of utility methods to do IP Address Validate
boolean | isIPv6(String address) is I Pv return IPV6_PATTERN.matcher(address).matches();
|
boolean | isIpV6Address(CharSequence address) is Ip V Address if (address == null) { return false; return IPV6_PATTERN.matcher(address).matches(); |
boolean | isIPv6Address(final String input) is I Pv Address return isIPv6StdAddress(input) || isIPv6HexCompressedAddress(input);
|
boolean | isIPv6Address(final String input) Checks whether the parameter is a valid IPv6 address (including compressed). return isIPv6StdAddress(input) || isIPv6HexCompressedAddress(input);
|
boolean | isIPv6Address(String _ipAddress) Checks if given String is an IPv6 address. return IPV6_PATTERN.matcher(_ipAddress).matches();
|
boolean | isIPv6HexCompressedAddress(final String input) Checks whether the parameter is a valid compressed IPv6 address int colonCount = 0; for (int i = 0; i < input.length(); i++) { if (input.charAt(i) == COLON_CHAR) { colonCount++; return colonCount <= MAX_COLON_COUNT && IPV6_HEX_COMPRESSED_PATTERN.matcher(input).matches(); |
boolean | isIPv6HexCompressedAddress(final String input) is I Pv Hex Compressed Address return IPV6_HEX_COMPRESSED_PATTERN.matcher(input).matches();
|
boolean | isIPv6HexCompressedAddress(String ip) is I Pv Hex Compressed Address int count = 0; for (int i = 0, length = ip.length(); i < length; i++) { if (ip.charAt(i) == COLON_CHAR) { count++; return count <= MAX_COLON_COUNT && IPV6_HEX_COMPRESSED_PATTERN.matcher(ip).matches(); |
boolean | isIPv6LiteralAddress(String src) is I Pv Literal Address return textToNumericFormatV6(src) != null;
|
boolean | isIpV6RegexValid(String strIp) check if IP v6 string is valid by regex. final String regexV6 = "^([\\da-fA-F]{1,4}:){6}" + "((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}" + "(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$|" + "^::([\\da-fA-F]{1,4}:){0,5}" + "((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}" + "(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$|" + "^([\\da-fA-F]{1,4}:):([\\da-fA-F]{1,4}:){0,4}" + "((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}" + "(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$|" + "^([\\da-fA-F]{1,4}:){2}:([\\da-fA-F]{1,4}:){0,3}" + "((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}" + "(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$|" + "^([\\da-fA-F]{1,4}:){3}:([\\da-fA-F]{1,4}:){0,2}" + "((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}" + "(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$|" + "^([\\da-fA-F]{1,4}:){4}:([\\da-fA-F]{1,4}:){0,1}" ... |