Package org.apache.http.conn.util
Class InetAddressUtils
java.lang.Object
org.apache.http.conn.util.InetAddressUtils
A collection of utilities relating to InetAddresses.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isIPv4Address
(String input) Checks whether the parameter is a valid IPv4 addressstatic boolean
isIPv4MappedIPv64Address
(String input) static boolean
isIPv6Address
(String input) Checks whether the parameter is a valid IPv6 address (including compressed).static boolean
isIPv6HexCompressedAddress
(String input) Checks whether the parameter is a valid compressed IPv6 addressstatic boolean
isIPv6StdAddress
(String input) Checks whether the parameter is a valid standard (non-compressed) IPv6 address
-
Field Details
-
IPV4_BASIC_PATTERN_STRING
- See Also:
-
IPV4_PATTERN
-
IPV4_MAPPED_IPV6_PATTERN
-
IPV6_STD_PATTERN
-
IPV6_HEX_COMPRESSED_PATTERN
-
COLON_CHAR
private static final char COLON_CHAR- See Also:
-
MAX_COLON_COUNT
private static final int MAX_COLON_COUNT- See Also:
-
-
Constructor Details
-
InetAddressUtils
private InetAddressUtils()
-
-
Method Details
-
isIPv4Address
Checks whether the parameter is a valid IPv4 address- Parameters:
input
- the address string to check for validity- Returns:
- true if the input parameter is a valid IPv4 address
-
isIPv4MappedIPv64Address
-
isIPv6StdAddress
Checks whether the parameter is a valid standard (non-compressed) IPv6 address- Parameters:
input
- the address string to check for validity- Returns:
- true if the input parameter is a valid standard (non-compressed) IPv6 address
-
isIPv6HexCompressedAddress
Checks whether the parameter is a valid compressed IPv6 address- Parameters:
input
- the address string to check for validity- Returns:
- true if the input parameter is a valid compressed IPv6 address
-
isIPv6Address
Checks whether the parameter is a valid IPv6 address (including compressed).- Parameters:
input
- the address string to check for validity- Returns:
- true if the input parameter is a valid standard or compressed IPv6 address
-