Class IPAddressUtil


  • public class IPAddressUtil
    extends Object
    • Constructor Detail

      • IPAddressUtil

        public IPAddressUtil()
    • Method Detail

      • textToNumericFormatV4

        public static byte[] textToNumericFormatV4​(String src)
      • textToNumericFormatV6

        public static byte[] textToNumericFormatV6​(String src)
      • isIPv4LiteralAddress

        public static boolean isIPv4LiteralAddress​(String src)
        Parameters:
        src - a String representing an IPv4 address in textual format
        Returns:
        a boolean indicating whether src is an IPv4 literal address
      • isIPv6LiteralAddress

        public static boolean isIPv6LiteralAddress​(String src)
        Parameters:
        src - a String representing an IPv6 address in textual format
        Returns:
        a boolean indicating whether src is an IPv6 literal address
      • convertFromIPv4MappedAddress

        public static byte[] convertFromIPv4MappedAddress​(byte[] addr)
      • match

        public static boolean match​(char c,
                                    long lowMask,
                                    long highMask)
      • scan

        public static int scan​(String s,
                               long lowMask,
                               long highMask)
      • scan

        public static int scan​(String s,
                               long lowMask,
                               long highMask,
                               char[] others)
      • checkAuthority

        public static String checkAuthority​(URL url)
      • checkExternalForm

        public static String checkExternalForm​(URL url)
      • checkHostString

        public static String checkHostString​(String host)