Package org.somda.sdc.dpws.network
Class NetworkInterfaceUtil
-
- All Implemented Interfaces:
public class NetworkInterfaceUtilUtility class for network interface related functionality.
-
-
Constructor Summary
Constructors Constructor Description NetworkInterfaceUtil()
-
Method Summary
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
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.
-
-
-
-