public class InterfaceMap extends Object
InterfaceMap reports the local IP address
assigned to a given service component that carries IP data.
Applications may use the returned IP address to specify the network
interface to which an instance of
java.net.DatagramSocket or
java.net.MulticastSocket should bind.| Modifier and Type | Method and Description |
|---|---|
static InetAddress |
getLocalAddress(Locator locator)
Reports the local IP address assigned to the given service
component.
|
public static InetAddress getLocalAddress(Locator locator) throws InvalidLocatorException, IOException
locator - The service component for which the local IP
address mapping is required.InvalidLocatorException - If the given locator does not
refer to a valid source of IP data, or if this system does not
support the reception of broadcast IP data.IOException - If a local IP address is not available to
be assigned to the source of IP data.Copyright © 2012 code4tv.com. All Rights Reserved.