I am trying to convert strings into Inetaddress
. I am not trying to resolve hostnames: the strings are ipv4 addresses. Does InetAddress.getByName(String host)
work? Or do I have to manually parse it?
com.google.common.net.InetAddresses.forString(String ipString)
is better for this as it will not do a DNS lookup regardless of what string is passed to it.