I assume that would work, but you shouldn't really need to do that. I believe that the java.net.InetAddress class explicitly states that it caches DNS lookup information to avoid that cost.
Look at the JavaDocs for java.net.InetAddress - it explains the algorithm used and how to modify it. In the end HttpClient isn't in control of the hostname-to-ip resolution...unless there is some kind virtual name processing being used. ...Pete Starbucks Coffee Co. - MS IT-5 2401 Utah Ave S Seattle, WA. 98134 (w) 206-318-5933 -----Original Message----- From: Feng Jiang [mailto:[EMAIL PROTECTED] Sent: Friday, June 08, 2007 1:19 AM To: [email protected] Subject: Can httpclient fetch a url by given ip without querying dns? Hi all, when i use httpclient to fetch a lot of urls, i have already had the ip of host for each url. I don't want the httpclient to query dns for its ip, because it will cost a lot of time. So can I explicitly set IP for each url? Thanks a lot, Feng --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
