public class AddressUtils
Modifier and Type | Field and Description |
---|---|
static AddressUtils |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
isPublic(java.net.InetAddress address)
Returns
true if the provided address is a public IP address or hostname. |
boolean |
isPublic(java.lang.String hostText) |
java.net.InetAddress |
tryDetectPublicIP()
Returns the first public IP address found on any of the network interfaces, or
null if none found. |
public static AddressUtils INSTANCE
public java.net.InetAddress tryDetectPublicIP()
Returns the first public IP address found on any of the network interfaces, or null
if none found.
public boolean isPublic(java.net.InetAddress address)
Returns true
if the provided address
is a public IP address or hostname.
public boolean isPublic(java.lang.String hostText)