|
@@ -611,6 +611,13 @@ public class NetUtils {
|
|
|
catch(UnknownHostException uhe) {return "" + uhe;}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Compose a "host:port" string from the address.
|
|
|
+ */
|
|
|
+ public static String getHostPortString(InetSocketAddress addr) {
|
|
|
+ return addr.getHostName() + ":" + addr.getPort();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Checks if {@code host} is a local host name and return {@link InetAddress}
|
|
|
* corresponding to that address.
|