Class InetAddressUtils


  • public class InetAddressUtils
    extends java.lang.Object
    A collection of utilities relating to InetAddresses.
    Since:
    4.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isIPv4Address​(java.lang.String input)
      Checks whether the parameter is a valid IPv4 address
      static boolean isIPv4MappedIPv64Address​(java.lang.String input)  
      static boolean isIPv6Address​(java.lang.String input)
      Checks whether the parameter is a valid IPv6 address (including compressed).
      static boolean isIPv6HexCompressedAddress​(java.lang.String input)
      Checks whether the parameter is a valid compressed IPv6 address
      static boolean isIPv6StdAddress​(java.lang.String input)
      Checks whether the parameter is a valid standard (non-compressed) IPv6 address
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isIPv4Address

        public static boolean isIPv4Address​(java.lang.String input)
        Checks whether the parameter is a valid IPv4 address
        Parameters:
        input - the address string to check for validity
        Returns:
        true if the input parameter is a valid IPv4 address
      • isIPv4MappedIPv64Address

        public static boolean isIPv4MappedIPv64Address​(java.lang.String input)
      • isIPv6StdAddress

        public static boolean isIPv6StdAddress​(java.lang.String input)
        Checks whether the parameter is a valid standard (non-compressed) IPv6 address
        Parameters:
        input - the address string to check for validity
        Returns:
        true if the input parameter is a valid standard (non-compressed) IPv6 address
      • isIPv6HexCompressedAddress

        public static boolean isIPv6HexCompressedAddress​(java.lang.String input)
        Checks whether the parameter is a valid compressed IPv6 address
        Parameters:
        input - the address string to check for validity
        Returns:
        true if the input parameter is a valid compressed IPv6 address
      • isIPv6Address

        public static boolean isIPv6Address​(java.lang.String input)
        Checks whether the parameter is a valid IPv6 address (including compressed).
        Parameters:
        input - the address string to check for validity
        Returns:
        true if the input parameter is a valid standard or compressed IPv6 address