Constructs a string representation of this InetSocketAddress. This string is constructed by calling
InetAddress.toString()
on the InetAddress and concatenating the port number (with a colon).
If the address is an IPv6 address, the IPv6 literal is enclosed in square brackets, for example: "localhost/[0:0:0:0:0:0:0:1]:80"
. If the address is unresolved, <unresolved>
is displayed in place of the address literal, for example "foo/<unresolved>:80"
.
To retrieve a string representation of the hostname or the address, use getHostString()
, rather than parsing the string returned by this toString()
method.