Code example for InetAddress

Methods: getHostAddress

0
    } 
 
 
    public static String normalizeHostAddress(final InetAddress localHost) {
        if (localHost instanceof Inet6Address) {
            return "[" + localHost.getHostAddress() + "]";
        } 
        else { 
            return localHost.getHostAddress();
        } 
    } 
 
} 
Connect your IDE to all the code out there  Get Codota for Java