Modifier and Type | Class and Description |
---|---|
private static class |
Modifier and Type | Field and Description |
---|---|
private static final String | |
private static final boolean | |
private static final ConcurrentHashMap | cache
Mapping from unscoped local Inet(6)Address to the same address including the correct scope-id, determined from NetworkInterface. |
private static final long | |
private static final int | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final int | |
private static final int | |
private static final int | |
private static final int | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final long | |
private static final int | |
private static final char[] | |
private static final int[] | |
private static final long |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static String | |
public static String | |
public static String | |
private static String | |
public static String | |
private static boolean | |
public static String | |
public static byte[] | |
public static boolean | |
private static String | |
public static int | Returns: the numeric value represented by the character in the specified radix.the character to be converted. ch, int the radix. radix)Returns the numeric value of the character |
public static boolean | |
private static InetAddress | |
public static IllegalArgumentException | Returns: anIllegalArgumentException instanceaddress literal string to include to the exception message src)Creates |
public static boolean | Returns: true if input string is parsable as IPv4 address literal,
false otherwise.input string input)Try to parse String as IPv4 address literal by following BSD-style formatting rules. |
private static boolean | |
private static boolean | |
public static boolean | Returns: a boolean indicating whether src is an IPv4 literal addressa String representing an IPv4 address in textual format src)
|
private static boolean | Returns: aboolean indicating if the InetAddress is
an IPv4 mapped IPv6 address; or false if address is IPv4 address.Utility routine to check if the InetAddress is an IPv4 mapped IPv6 address. |
public static boolean | Returns: a boolean indicating whether src is an IPv6 literal addressa String representing an IPv6 address in textual format src)
|
private static boolean | |
public static boolean | |
public static int | |
private static int | |
public static byte[] | Returns: a byte array representing the IPv4 numeric address if input string is a parsable POSIX formatted IPv4 address literal,null otherwise.a String representing an IPv4 address in POSIX format input)Parse String as IPv4 address literal by following POSIX-style formatting rules. |
private static long | Returns: CANT_PARSE_IN_RADIX if field can not be parsed in requested radix .
TERMINAL_PARSE_ERROR if field can't be parsed and the whole parse process should be terminated.
Parsed field value otherwise.digits encoding radix to use for parsing. Valid values: 8, 10, 16. radix, CharBuffer CharBuffer with position set to the field's fist characterparsed field number fieldNumber)Method tries to parse IP address field that starts from current position of the provided character buffer. |
public static int | |
public static int | |
public static byte[] | |
public static byte[] | |
public static InetAddress | toScopedAddress(InetAddress address)
Returns a scoped version of the supplied local, link-local ipv6 address if that scope-id can be determined from local NetworkInterfaces. |
public static InetSocketAddress | |
public static byte[] | Returns: bytes array if string is a valid IPv4 address stringinput string src, boolean true - throw IllegalArgumentException when cannot be parsed
as IPv4 address string;
false - throw IllegalArgumentException only when IPv4 address
string is ambiguous.Validates if input string is a valid IPv4 address literal. |
ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP | back to summary |
---|---|
private static final String ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP |
ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP_VALUE | back to summary |
---|---|
private static final boolean ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP_VALUE |
cache | back to summary |
---|---|
private static final ConcurrentHashMap<InetAddress, InetAddress> cache Mapping from unscoped local Inet(6)Address to the same address including the correct scope-id, determined from NetworkInterface. |
CANT_PARSE_IN_RADIX | back to summary |
---|---|
private static final long CANT_PARSE_IN_RADIX |
DECIMAL | back to summary |
---|---|
private static final int DECIMAL |
H_AUTH_DELIMS | back to summary |
---|---|
private static final long H_AUTH_DELIMS |
H_BACKSLASH | back to summary |
---|---|
private static final long H_BACKSLASH |
H_COLON | back to summary |
---|---|
private static final long H_COLON |
H_EXCLUDE | back to summary |
---|---|
private static final long H_EXCLUDE |
H_EXCLUDED_DELIMS | back to summary |
---|---|
private static final long H_EXCLUDED_DELIMS |
H_FRAGMENT | back to summary |
---|---|
private static final long H_FRAGMENT |
H_GEN_DELIMS | back to summary |
---|---|
private static final long H_GEN_DELIMS |
H_IPV6_DELIMS | back to summary |
---|---|
private static final long H_IPV6_DELIMS |
H_NON_PRINTABLE | back to summary |
---|---|
private static final long H_NON_PRINTABLE |
H_QUERY | back to summary |
---|---|
private static final long H_QUERY |
H_SLASH | back to summary |
---|---|
private static final long H_SLASH |
H_UNWISE | back to summary |
---|---|
private static final long H_UNWISE |
HEXADECIMAL | back to summary |
---|---|
private static final int HEXADECIMAL |
INADDR16SZ | back to summary |
---|---|
private static final int INADDR16SZ |
INADDR4SZ | back to summary |
---|---|
private static final int INADDR4SZ |
INT16SZ | back to summary |
---|---|
private static final int INT16SZ |
L_AUTH_DELIMS | back to summary |
---|---|
private static final long L_AUTH_DELIMS |
L_BACKSLASH | back to summary |
---|---|
private static final long L_BACKSLASH |
L_COLON | back to summary |
---|---|
private static final long L_COLON |
L_EXCLUDE | back to summary |
---|---|
private static final long L_EXCLUDE |
L_EXCLUDED_DELIMS | back to summary |
---|---|
private static final long L_EXCLUDED_DELIMS |
L_FRAGMENT | back to summary |
---|---|
private static final long L_FRAGMENT |
L_GEN_DELIMS | back to summary |
---|---|
private static final long L_GEN_DELIMS |
L_IPV6_DELIMS | back to summary |
---|---|
private static final long L_IPV6_DELIMS |
L_NON_PRINTABLE | back to summary |
---|---|
private static final long L_NON_PRINTABLE |
L_QUERY | back to summary |
---|---|
private static final long L_QUERY |
L_SLASH | back to summary |
---|---|
private static final long L_SLASH |
L_UNWISE | back to summary |
---|---|
private static final long L_UNWISE |
OCTAL | back to summary |
---|---|
private static final int OCTAL |
OTHERS | back to summary |
---|---|
private static final char[] OTHERS |
SUPPORTED_RADIXES | back to summary |
---|---|
private static final int[] SUPPORTED_RADIXES |
TERMINAL_PARSE_ERROR | back to summary |
---|---|
private static final long TERMINAL_PARSE_ERROR |
IPAddressUtil | back to summary |
---|---|
public IPAddressUtil() |
checkAuth | back to summary |
---|---|
public static String checkAuth(String str) |
checkAuthority | back to summary |
---|---|
public static String checkAuthority(URL url) |
checkExternalForm | back to summary |
---|---|
public static String checkExternalForm(URL url) |
checkHost | back to summary |
---|---|
private static String checkHost(String str) |
checkHostString | back to summary |
---|---|
public static String checkHostString(String host) |
checkPrefix | back to summary |
---|---|
private static boolean checkPrefix(CharBuffer buffer, int radix) |
checkUserInfo | back to summary |
---|---|
public static String checkUserInfo(String str) |
convertFromIPv4MappedAddress | back to summary |
---|---|
public static byte[] convertFromIPv4MappedAddress(byte[] addr) |
delayURLParsing | back to summary |
---|---|
public static boolean delayURLParsing() |
describeChar | back to summary |
---|---|
private static String describeChar(char c) |
digit | back to summary |
---|---|
public static int digit(char ch, int radix) Returns the numeric value of the character
|
earlyURLParsing | back to summary |
---|---|
public static boolean earlyURLParsing() |
findScopedAddress | back to summary |
---|---|
private static InetAddress findScopedAddress(InetAddress address)
|
invalidIpAddressLiteral | back to summary |
---|---|
public static IllegalArgumentException invalidIpAddressLiteral(String src) Creates
|
isBsdParsableV4 | back to summary |
---|---|
public static boolean isBsdParsableV4(String input) Try to parse String as IPv4 address literal by following BSD-style formatting rules.
|
isDecimalFieldStart | back to summary |
---|---|
private static boolean isDecimalFieldStart(CharBuffer cb) |
isHexFieldStart | back to summary |
---|---|
private static boolean isHexFieldStart(CharBuffer cb) |
isIPv4LiteralAddress | back to summary |
---|---|
public static boolean isIPv4LiteralAddress(String src)
|
isIPv4MappedAddress | back to summary |
---|---|
private static boolean isIPv4MappedAddress(byte[] addr) Utility routine to check if the InetAddress is an IPv4 mapped IPv6 address.
|
isIPv6LiteralAddress | back to summary |
---|---|
public static boolean isIPv6LiteralAddress(String src)
|
isOctalFieldStart | back to summary |
---|---|
private static boolean isOctalFieldStart(CharBuffer cb) |
match | back to summary |
---|---|
public static boolean match(char c, long lowMask, long highMask) |
parseAsciiDigit | back to summary |
---|---|
public static int parseAsciiDigit(char c, int radix) |
parseAsciiHexDigit | back to summary |
---|---|
private static int parseAsciiHexDigit(char digit) |
parseBsdLiteralV4 | back to summary |
---|---|
public static byte[] parseBsdLiteralV4(String input) Parse String as IPv4 address literal by following POSIX-style formatting rules.
|
parseV4FieldBsd | back to summary |
---|---|
private static long parseV4FieldBsd(int radix, CharBuffer buffer, int fieldNumber) Method tries to parse IP address field that starts from current position of the provided character buffer.
This method supports three
If
Method returns
|
scan | back to summary |
---|---|
public static int scan(String s, long lowMask, long highMask) |
scan | back to summary |
---|---|
public static int scan(String s, long lowMask, long highMask, char[] others) |
textToNumericFormatV4 | back to summary |
---|---|
public static byte[] textToNumericFormatV4(String src)
|
textToNumericFormatV6 | back to summary |
---|---|
public static byte[] textToNumericFormatV6(String src) |
toScopedAddress | back to summary |
---|---|
public static InetAddress toScopedAddress(InetAddress address) throws SocketException Returns a scoped version of the supplied local, link-local ipv6 address if that scope-id can be determined from local NetworkInterfaces. If the address already has a scope-id or if the address is not local, ipv6 or link local, then the original address is returned.
|
toScopedAddress | back to summary |
---|---|
public static InetSocketAddress toScopedAddress(InetSocketAddress address) throws SocketException Same as above for InetSocketAddress |
validateNumericFormatV4 | back to summary |
---|---|
public static byte[] validateNumericFormatV4(String src, boolean throwIAE) Validates if input string is a valid IPv4 address literal.
If the "jdk.net.allowAmbiguousIPAddressLiterals" system property is set
to
|
Modifier and Type | Field and Description |
---|---|
private static final String | |
private static final boolean | |
pack-priv static final long | |
pack-priv static final long | |
pack-priv static final long | |
pack-priv static final long | |
pack-priv static final long | |
pack-priv static final long |
Access | Constructor and Description |
---|---|
private |
DELAY_URL_PARSING_SP | back to summary |
---|---|
private static final String DELAY_URL_PARSING_SP |
DELAY_URL_PARSING_SP_VALUE | back to summary |
---|---|
private static final boolean DELAY_URL_PARSING_SP_VALUE |
H_HOSTNAME_MASK | back to summary |
---|---|
pack-priv static final long H_HOSTNAME_MASK |
H_SCOPE_MASK | back to summary |
---|---|
pack-priv static final long H_SCOPE_MASK |
H_USERINFO_MASK | back to summary |
---|---|
pack-priv static final long H_USERINFO_MASK |
L_HOSTNAME_MASK | back to summary |
---|---|
pack-priv static final long L_HOSTNAME_MASK |
L_SCOPE_MASK | back to summary |
---|---|
pack-priv static final long L_SCOPE_MASK |
L_USERINFO_MASK | back to summary |
---|---|
pack-priv static final long L_USERINFO_MASK |
MASKS | back to summary |
---|---|
private MASKS() |