Package com.wireguard.config
Class InetAddresses
- java.lang.Object
-
- com.wireguard.config.InetAddresses
-
public final class InetAddresses extends java.lang.ObjectUtility methods for creating instances ofInetAddress.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisHostname(java.lang.CharSequence maybeHostname)Determines whether input is a valid DNS hostname.static java.net.InetAddressparse(java.lang.String address)Parses a numeric IPv4 or IPv6 address without performing any DNS lookups.
-
-
-
Method Detail
-
isHostname
public static boolean isHostname(java.lang.CharSequence maybeHostname)
Determines whether input is a valid DNS hostname.- Parameters:
maybeHostname- a string that is possibly a DNS hostname- Returns:
- whether or not maybeHostname is a valid DNS hostname
-
parse
public static java.net.InetAddress parse(java.lang.String address) throws ParseExceptionParses a numeric IPv4 or IPv6 address without performing any DNS lookups.- Parameters:
address- a string representing the IP address- Returns:
- an instance of
Inet4AddressorInet6Address, as appropriate - Throws:
ParseException
-
-