Package com.bytedesk.core.uid.utils
Class NetUtils
java.lang.Object
com.bytedesk.core.uid.utils.NetUtils
NetUtils
- Author:
- yutianbao
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Retrieve local addressstatic InetAddress
static InetAddress
Retrieve the first validated local ip address(the Public and LAN ip addresses are validated).
-
Field Details
-
localAddress
Pre-loaded local address
-
-
Constructor Details
-
NetUtils
public NetUtils()
-
-
Method Details
-
getLocalInetAddress
Retrieve the first validated local ip address(the Public and LAN ip addresses are validated).- Returns:
- the local address
- Throws:
SocketException
- the socket exception
-
getLocalAddressInstance
-
getLocalAddress
Retrieve local address- Returns:
- the string local address
-