title: Convert a String to InetAddress without DNS lookup
body: <p>I have a local IP address in dotted decimal notation in a <code>String</code>. I want to convert it to an <code>InetAddress</code> to feed it to <code>Socket</code>, but I need to do it without doing a DNS lookup (because this might cause lengthy timeouts).</p>
  
  <p>Is there a ready method for that, or do I need to split the <code>String</code> and create the <code>InetAddress</code> from its bytes?</p>
  
  <p><strong>Update</strong> The factory methods <code>InetAddress.getByName()</code> and <code>InetAddress.getByAddress()</code> don't seem to be a good fit, as they both also accept hostnames such as <code>java.sun.com</code>. There is no saying if they will try to contact a DNS server in their implementation.</p>