NetworkInterface

This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.

It is used to identify the local interface on which a multicast group is joined.


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);
  }
}
Home 
  Java Book 
    Networking  

NetworkInterface:
  1. NetworkInterface
  2. NetworkInterface: getDisplayName()
  3. NetworkInterface: getHardwareAddress()
  4. NetworkInterface: getHardwareAddress() throws SocketException
  5. NetworkInterface: getInetAddresses()
  6. NetworkInterface: getName()