public class InetAddressValidator extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
isIPv4Address(String input)
Check if
input is a valid IPv4 address. |
static boolean |
isIPv6Address(String input)
Check if
input is a IPv6 address. |
static boolean |
isIPv6HexCompressedAddress(String input)
Check if the given address is a valid IPv6 address in the hex-compressed notation The format is
'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'.
|
static boolean |
isIPv6IPv4MappedAddress(String input)
Check if
input is an IPv4 address mapped into a IPv6 address. |
static boolean |
isIPv6MixedAddress(String input)
Check if the given address is a valid IPv6 address in the mixed-standard or mixed-compressed notation.
|
static boolean |
isIPv6StdAddress(String input)
Check if the given address is a valid IPv6 address in the standard format The format is
'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'.
|
static boolean |
isLinkLocalIPv6WithZoneIndex(String input)
Check if
input is a link local IPv6 address starting with "fe80:" and containing a zone index with
"%xxx". |
public static boolean isIPv4Address(String input)
input is a valid IPv4 address. The format is 'xxx.xxx.xxx.xxx'. Four blocks of integer
numbers ranging from 0 to 255 are required. Letters are not allowed.input - ip-address to checkinput is in correct IPv4 notation.public static boolean isIPv6StdAddress(String input)
input - ip-address to checkinput is in correct IPv6 notation.public static boolean isIPv6HexCompressedAddress(String input)
input - ip-address to checkinput is in correct IPv6 (hex-compressed) notation.public static boolean isIPv6Address(String input)
input is a IPv6 address. Possible notations for valid IPv6 are: - Standard IPv6 address -
Hex-compressed IPv6 address - Link-local IPv6 address - IPv4-mapped-to-IPV6 address - IPv6 mixed addressinput - ip-address to checkinput is in correct IPv6 notation.public static boolean isIPv6MixedAddress(String input)
input - ip-address to checkinput is in correct IPv6 (mixed-standard or mixed-compressed) notation.public static boolean isIPv6IPv4MappedAddress(String input)
input is an IPv4 address mapped into a IPv6 address. These are starting with "::ffff:"
followed by the IPv4 address in a dot-seperated notation. The format is '::ffff:d.d.d.d'input - ip-address to checkinput is in correct IPv6 notation containing an IPv4 addresspublic static boolean isLinkLocalIPv6WithZoneIndex(String input)
input is a link local IPv6 address starting with "fe80:" and containing a zone index with
"%xxx". The zone index will not be checked.input - ip-address to checkinput is in correct IPv6 notation.Copyright © 2018–2024 Alibaba Group. All rights reserved.