NetworkInterface: getByInetAddress(InetAddress addr) : NetworkInterface « java.net « Java by API






NetworkInterface: getByInetAddress(InetAddress addr)

 

import java.net.InetAddress;
import java.net.NetworkInterface;

public class ReportByAddress {
  static public void main(String args[]) throws Exception {
    InetAddress ia = InetAddress.getByName("www.google.ca");
    NetworkInterface ni = NetworkInterface.getByInetAddress(ia);
    System.out.println(ni);
  }
}

           
         
  








Related examples in the same category

1.NetworkInterface: getDisplayName()
2.NetworkInterface: getHardwareAddress()
3.NetworkInterface: getHardwareAddress() throws SocketException
4.NetworkInterface: getInetAddresses()
5.NetworkInterface: getInterfaceAddresses()
6.NetworkInterface: getMTU()
7.NetworkInterface: getName()
8.NetworkInterface: isLoopback()
9.NetworkInterface: isPointToPoint()
10.NetworkInterface: isUp()
11.NetworkInterface: isVirtual()
12.NetworkInterface: supportsMulticast()