Package org.somda.sdc.dpws.network
Class NetworkInterfaceUtil
- java.lang.Object
-
- org.somda.sdc.dpws.network.NetworkInterfaceUtil
-
public class NetworkInterfaceUtil extends Object
Utility class for network interface related functionality.
-
-
Constructor Summary
Constructors Constructor Description NetworkInterfaceUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<InetAddress>getFirstIpV4Address(NetworkInterface networkInterface)Loops through a network interface's addresses and returns the first one that matches an IPv4 address.
-
-
-
Method Detail
-
getFirstIpV4Address
public Optional<InetAddress> getFirstIpV4Address(NetworkInterface networkInterface)
Loops through a network interface's addresses and returns the first one that matches an IPv4 address.- Parameters:
networkInterface- the network interface where to seek for an IPv4 address.- Returns:
- the first found IPv4 address or empty if there is no IPv4 address connected to the network interface.
-
-