@@ -101,6 +101,10 @@ private InetAddressUtils() {
101
101
private static final int MAX_COLON_COUNT = 7 ;
102
102
103
103
/**
104
+ * Tests whether the parameter is a valid IPv4 address
105
+ *
106
+ * @param input the address character sequence to check for validity
107
+ * @return true if the input parameter is a valid IPv4 address
104
108
* @deprecated Use {@link #isIPv4(CharSequence)}
105
109
*/
106
110
@ Deprecated
@@ -109,7 +113,7 @@ public static boolean isIPv4Address(final String input) {
109
113
}
110
114
111
115
/**
112
- * Checks whether the parameter is a valid IPv4 address
116
+ * Tests whether the parameter is a valid IPv4 address.
113
117
*
114
118
* @param input the address character sequence to check for validity
115
119
* @return true if the input parameter is a valid IPv4 address
@@ -120,6 +124,10 @@ public static boolean isIPv4(final CharSequence input) {
120
124
}
121
125
122
126
/**
127
+ * Tests if an IPv6 address is an IPv4-mapped IPv6 address.
128
+ *
129
+ * @param input the IPv6 address to be checked
130
+ * @return true if the IPv6 address is an IPv4-mapped IPv6 address, false otherwise.
123
131
* @deprecated Use {@link #isIPv4MappedIPv6(CharSequence)}
124
132
*/
125
133
@ Deprecated
@@ -128,7 +136,7 @@ public static boolean isIPv4MappedIPv64Address(final String input) {
128
136
}
129
137
130
138
/**
131
- * Check if an IPv6 address is an IPv4-mapped IPv6 address.
139
+ * Tests if an IPv6 address is an IPv4-mapped IPv6 address.
132
140
*
133
141
* @param input the IPv6 address to be checked
134
142
* @return true if the IPv6 address is an IPv4-mapped IPv6 address, false otherwise.
@@ -150,6 +158,10 @@ static boolean hasValidIPv6ColonCount(final CharSequence input) {
150
158
}
151
159
152
160
/**
161
+ * Tests whether the parameter is a valid standard (non-compressed) IPv6 address
162
+ *
163
+ * @param input the address character sequence to check for validity
164
+ * @return true if the input parameter is a valid standard (non-compressed) IPv6 address
153
165
* @deprecated Use {@link #isIPv6Std(CharSequence)}
154
166
*/
155
167
@ Deprecated
@@ -158,7 +170,7 @@ public static boolean isIPv6StdAddress(final String input) {
158
170
}
159
171
160
172
/**
161
- * Checks whether the parameter is a valid standard (non-compressed) IPv6 address
173
+ * Tests whether the parameter is a valid standard (non-compressed) IPv6 address
162
174
*
163
175
* @param input the address character sequence to check for validity
164
176
* @return true if the input parameter is a valid standard (non-compressed) IPv6 address
@@ -169,6 +181,10 @@ public static boolean isIPv6Std(final CharSequence input) {
169
181
}
170
182
171
183
/**
184
+ * Tests whether the parameter is a valid compressed IPv6 address
185
+ *
186
+ * @param input the address character sequence to check for validity
187
+ * @return true if the input parameter is a valid compressed IPv6 address
172
188
* @deprecated Use {@link #isIPv6HexCompressed(CharSequence)}
173
189
*/
174
190
@ Deprecated
@@ -177,7 +193,7 @@ public static boolean isIPv6HexCompressedAddress(final String input) {
177
193
}
178
194
179
195
/**
180
- * Checks whether the parameter is a valid compressed IPv6 address
196
+ * Tests whether the parameter is a valid compressed IPv6 address
181
197
*
182
198
* @param input the address character sequence to check for validity
183
199
* @return true if the input parameter is a valid compressed IPv6 address
@@ -188,6 +204,10 @@ public static boolean isIPv6HexCompressed(final CharSequence input) {
188
204
}
189
205
190
206
/**
207
+ * Tests whether the parameter is a valid IPv6 address (including compressed).
208
+ *
209
+ * @param input the address character sequence to check for validity
210
+ * @return true if the input parameter is a valid standard or compressed IPv6 address
191
211
* @deprecated Use {@link #isIPv6(CharSequence)}
192
212
*/
193
213
@ Deprecated
@@ -196,7 +216,7 @@ public static boolean isIPv6Address(final String input) {
196
216
}
197
217
198
218
/**
199
- * Checks whether the parameter is a valid IPv6 address (including compressed).
219
+ * Tests whether the parameter is a valid IPv6 address (including compressed).
200
220
*
201
221
* @param input the address character sequence to check for validity
202
222
* @return true if the input parameter is a valid standard or compressed IPv6 address
@@ -224,6 +244,11 @@ public static boolean isIPv6(final CharSequence input) {
224
244
}
225
245
226
246
/**
247
+ * Tests whether the parameter is a valid URL formatted bracketed IPv6 address (including compressed).
248
+ * This matches only bracketed values e.g. {@code [::1]}.
249
+ *
250
+ * @param input the address character sequence to check for validity
251
+ * @return true if the input parameter is a valid URL-formatted bracketed IPv6 address
227
252
* @deprecated Use {@link #isIPv6URLBracketed(CharSequence)}
228
253
*/
229
254
@ Deprecated
@@ -232,7 +257,7 @@ public static boolean isIPv6URLBracketedAddress(final String input) {
232
257
}
233
258
234
259
/**
235
- * Checks whether the parameter is a valid URL formatted bracketed IPv6 address (including compressed).
260
+ * Tests whether the parameter is a valid URL formatted bracketed IPv6 address (including compressed).
236
261
* This matches only bracketed values e.g. {@code [::1]}.
237
262
*
238
263
* @param input the address character sequence to check for validity
@@ -251,6 +276,8 @@ public static boolean isIPv6URLBracketed(final CharSequence input) {
251
276
/**
252
277
* Formats {@link SocketAddress} as text.
253
278
*
279
+ * @param buffer The target buffer to append.
280
+ * @param socketAddress The SocketAddress to append to {@code buffer}.
254
281
* @since 5.0
255
282
*/
256
283
public static void formatAddress (
@@ -271,8 +298,12 @@ public static void formatAddress(
271
298
}
272
299
273
300
/**
274
- * Returns canonical name (fully qualified domain name) of the localhost.
301
+ * Gets the canonical name of the local host, a fully qualified domain name.
302
+ * <p>
303
+ * This can be {@code "localhost"} or a fully qualified domain name like {@code "host.docker.internal"}.
304
+ * </p>
275
305
*
306
+ * @return the canonical name of the local host.
276
307
* @since 5.0
277
308
*/
278
309
public static String getCanonicalLocalHostName () {
0 commit comments