public static Inet4Address getEmbeddedIPv4ClientAddress ( Inet6Address ip ) { if ( isCompatIPv4Address ( ip ) ) { return getCompatIPv4Address ( ip ) ; } if ( is6to4Address ( ip ) ) { return get6to4IPv4Address ( ip ) ; } if ( isTeredoAddress ( ip ) ) { return getTeredoInfo ( ip ) . getClient ( ) ; } throw formatIllegalArgumentException ( "'%s' has no embedded IPv4 address." , toAddrString ( ip ) ) ; }
Examines the Inet6Address to extract the embedded IPv4 client address if the InetAddress is an IPv6 address of one of the specified address types that contain an embedded IPv4 address .