Java IP Address Validate isIPv6(String address)

Here you can find the source of isIPv6(String address)

Description

is I Pv

License

Open Source License

Declaration

public static boolean isIPv6(String address) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.regex.Pattern;

public class Main {
    private static final Pattern IPV6_PATTERN = Pattern.compile("^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$");

    public static boolean isIPv6(String address) {
        return IPV6_PATTERN.matcher(address).matches();
    }//from w ww.ja  v a2s. c om
}

Related

  1. isIPv4LiteralAddress(String src)
  2. isIPv4LiteralAddress(String string)
  3. isIpV4PortAddress(String s)
  4. isIpV4StrValid(String str)
  5. isIPv6(final String ip)
  6. isIpV6Address(CharSequence address)
  7. isIPv6Address(final String input)
  8. isIPv6Address(final String input)
  9. isIPv6Address(String _ipAddress)