public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException {
        if (addr == null) {
            throw new NullPointerException();
        }
        if (!(addr instanceof Inet4Address || addr instanceof Inet6Address)) {
            throw new IllegalArgumentException ("invalid address type");
        }
        return getByInetAddress0(addr);
    }
public static NetworkInterface getByInetAddress ( InetAddress addr ) throws SocketException { if ( addr == null ) { throw new NullPointerException ( ) ; } if ( ! ( addr instanceof Inet4Address || addr instanceof Inet6Address ) ) { throw new IllegalArgumentException ( "invalid address type" ) ; } return getByInetAddress0 ( addr ) ; }
Convenience method to search for a network interface that
has the specified Internet Protocol (IP) address bound to
it.
<p>
If the specified IP address is bound to multiple network
interfaces it is not defined which network interface is
returned.

@param   addr
The <tt>InetAddress</tt> to search with.

@return  A <tt>NetworkInterface</tt>
or <tt>null</tt> if there is no network interface
with the specified IP address.

@throws  SocketException
If an I/O error occurs.

@throws  NullPointerException
If the specified address is <tt>null</tt>.