title: Scala or java lib to resolve host name with specific nameserver
body: <p>Given a hostname like "example.com" I want to get its IP-addreses using specific nameserver.</p>
  
  <p>java.net.InetAddress has</p>
  
  <pre><code> private static InetAddress getByName(String host, InetAddress reqAddr)
  </code></pre>
  
  <p>which looks like what I need, but the blooper is that method is private.</p>
  
  <p><a href="https://github.com/gilt/scala-srv-dns" rel="nofollow">https://github.com/gilt/scala-srv-dns</a> has</p>
  
  <pre><code>def lookup(serviceName: ServiceName,
           transportProtocol: TransportProtocol,
           dnsSearchPaths: List[String]): Seq[ServiceRecord]
  </code></pre>
  
  <p>But, again, private method.</p>
  
  <p>So, what lib can I use?
  And do you have any idea why the libs listed above have these methods private?</p>