InetAddressUtils { public static boolean isIPv4MappedIPv64Address(final String input) { return IPV4_MAPPED_IPV6_PATTERN.matcher(input).matches(); } private  InetAddressUtils(); static boolean isIPv4Address(final String input); static boolean isIPv4MappedIPv64Address(final String input); static boolean isIPv6StdAddress(final String input); static boolean isIPv6HexCompressedAddress(final String input); static boolean isIPv6Address(final String input); static void formatAddress(
            final StringBuilder buffer,
            final SocketAddress socketAddress); static String getCanonicalLocalHostName();  }
@Test public void testValidIPv4MappedIPv6Address() { Assert.assertTrue(InetAddressUtils.isIPv4MappedIPv64Address("::FFFF:1.2.3.4")); Assert.assertTrue(InetAddressUtils.isIPv4MappedIPv64Address("::ffff:255.255.255.255")); }
@Test public void testInValidIPv4MappedIPv6Address() { Assert.assertFalse(InetAddressUtils.isIPv4MappedIPv64Address("2001:0db8:0000:0000:0000:0000:1428:57ab")); Assert.assertFalse(InetAddressUtils.isIPv4MappedIPv64Address("::ffff:1:2:3:4")); }