public static URI resolveUriHost2Address(URI uri) {
        // convert the uri to URL.
        try {
            URL url = uri.toURL();
            String host = url.getHost();
            String ip = resolveHost2Address(host);
            if(ip != null) {
                url = new URL(url.getProtocol(), ip, url.getPort(), url.getFile());
                uri = url.toURI();
            }
        } catch (MalformedURLException | URISyntaxException e) {
            throw new RuntimeException(e);
        }
        return uri;
    }
@Test
    public void testReplaceUriHostname2Address() throws URISyntaxException {
        URI uri = new URI("https://localhost:8443");
        uri = NetUtils.resolveUriHost2Address(uri);
        System.out.println("uri = " + uri);
    }