public class AddressIdentifier
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AddressIdentifier.AddressType |
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
ipv4Pattern |
static java.util.regex.Pattern |
ipv6ISATAPPattern |
static java.util.regex.Pattern |
ipv6Pattern |
static java.util.regex.Pattern |
ipv6PatternWithPercentScopeID |
| Constructor and Description |
|---|
AddressIdentifier() |
| Modifier and Type | Method and Description |
|---|---|
static AddressIdentifier.AddressType |
getAddressType(java.lang.String address)
Tries to detemine the address type of the given address.
|
static AddressIdentifier.AddressType |
getAddressType(java.lang.String address,
boolean allowIPv6PercentScopeID)
Tries to detemine the address type of the given address.
|
static boolean |
isAnISATAPIPv6Address(java.lang.String address) |
public static final java.util.regex.Pattern ipv4Pattern
public static final java.util.regex.Pattern ipv6Pattern
public static final java.util.regex.Pattern ipv6PatternWithPercentScopeID
public static final java.util.regex.Pattern ipv6ISATAPPattern
public static AddressIdentifier.AddressType getAddressType(java.lang.String address)
address - The address to determine the type ofAddressIdentifier.AddressType.OTHER if address is a
hostname, AddressIdentifier.AddressType.IPv4 or AddressIdentifier.AddressType.IPv6
otherwisepublic static AddressIdentifier.AddressType getAddressType(java.lang.String address, boolean allowIPv6PercentScopeID)
address - The address to determine the type ofallowIPv6PercentScopeID - If true, match %AddressIdentifier.AddressType.OTHER if address is a
hostname, AddressIdentifier.AddressType.IPv4 or AddressIdentifier.AddressType.IPv6
otherwisepublic static boolean isAnISATAPIPv6Address(java.lang.String address)