public static boolean isMappedIPv4Address ( Inet6Address ip ) { byte bytes [ ] = ip . getAddress ( ) ; return ( ( bytes [ 0 ] == 0x00 ) && ( bytes [ 1 ] == 0x00 ) && ( bytes [ 2 ] == 0x00 ) && ( bytes [ 3 ] == 0x00 ) && ( bytes [ 4 ] == 0x00 ) && ( bytes [ 5 ] == 0x00 ) && ( bytes [ 6 ] == 0x00 ) && ( bytes [ 7 ] == 0x00 ) && ( bytes [ 8 ] == 0x00 ) && ( bytes [ 9 ] == 0x00 ) && ( bytes [ 10 ] == ( byte ) 0xff ) && ( bytes [ 11 ] == ( byte ) 0xff ) ) ; }
Evaluates whether the argument is an IPv6 mapped address .