-
Methods in java.net that return NetworkInterface
| Modifier and Type |
Method |
Description |
static NetworkInterface |
NetworkInterface.getByIndex(int index) |
Returns the NetworkInterface corresponding to the given interface index, or null if no
interface has this index.
|
static NetworkInterface |
NetworkInterface.getByInetAddress(InetAddress address) |
Returns the NetworkInterface corresponding to the given address, or null if no
interface has this address.
|
static NetworkInterface |
NetworkInterface.getByName(String interfaceName) |
Returns the NetworkInterface corresponding to the named network interface, or null
if no interface has this name.
|
NetworkInterface |
MulticastSocket.getNetworkInterface() |
Returns the outgoing network interface used by this socket.
|
NetworkInterface |
NetworkInterface.getParent() |
Returns the parent NetworkInterface of this interface if this is a
sub-interface, or null if it's a physical (non virtual) interface.
|
NetworkInterface |
Inet6Address.getScopedInterface() |
Returns the network interface if this address is instanced with a scoped
network interface, null otherwise.
|
Methods in java.net with parameters of type NetworkInterface
| Modifier and Type |
Method |
Description |
static Inet6Address |
Inet6Address.getByAddress(String host,
byte[] addr,
NetworkInterface nif) |
Gets an IPv6 address instance according to the given host,
addr and nif.
|
boolean |
InetAddress.isReachable(NetworkInterface networkInterface,
int ttl,
int timeout) |
Tries to reach this InetAddress.
|
protected abstract void |
DatagramSocketImpl.joinGroup(SocketAddress addr,
NetworkInterface netInterface) |
Adds this socket to the multicast group addr.
|
void |
MulticastSocket.joinGroup(SocketAddress groupAddress,
NetworkInterface netInterface) |
Adds this socket to the specified multicast group.
|
void |
PlainDatagramSocketImpl.joinGroup(SocketAddress addr,
NetworkInterface netInterface) |
|
protected abstract void |
DatagramSocketImpl.leaveGroup(SocketAddress addr,
NetworkInterface netInterface) |
Removes this socket from the multicast group addr.
|
void |
MulticastSocket.leaveGroup(SocketAddress groupAddress,
NetworkInterface netInterface) |
Removes this socket from the specified multicast group.
|
void |
PlainDatagramSocketImpl.leaveGroup(SocketAddress addr,
NetworkInterface netInterface) |
|
void |
DatagramSocket.setNetworkInterface(NetworkInterface netInterface) |
Sets the network interface used by this socket.
|
void |
MulticastSocket.setNetworkInterface(NetworkInterface networkInterface) |
Sets the outgoing network interface used by this socket to the given
networkInterface.
|