@ThreadSafe public final class Net extends Object
Modifier and Type | Method and Description |
---|---|
static String |
ccTLD(String cc)
Converts a country code from ISO 3166-1 alpha-2 to top-level domain (ccTLD).
|
static MatchResult |
matchIPAddress(String s)
Matches the specified string against the pattern of a dotted decimal IPV4 address
such as "127.0.0.1".
|
static String |
widestCookieDomain(String host)
Returns the widest possible cookie domain (e.g. ".mydomain.dom") for the host, or
null if no domain can be determined from the host specification.
|
public static final String ccTLD(String cc)
cc
- the ISO 3166-1 alpha-2 country code in upper case.public static MatchResult matchIPAddress(String s)
public static String widestCookieDomain(String host)
host
- the host specification. This is normally the fully qualified
domain name of the page host, as for example "hostname.mydomain.dom" or
"mydomain.dom". It can also be an Internet address ("206.248.142.181") or
"localhost". The value can also be null, in which case the result is null.