code: public static final String getServerString(InetSocketAddress addr) {
      return addr.getHostString() + ":" + Integer.toString(addr.getPort());
    }
docs: Create an unresolved server string (hostname:port) from an InetSocketAddress.