How to Set URLConnection's Socket IP

Condition:I have servial IP in mine computer(3 modems)

url = new URL ( "XXXXXXX" );

httpConn = (HttpURLConnection) url.openConnection();

And the httpConn's IP is the localhost default ip,and i can't find a method to set the SocketIP for the URLConnection.

Then I try Proxy:

InetAddress ia = InetAddress.getLocalHost();

SocketAddress proxyAddress = new InetSocketAddress ( ia, 80 );

Proxy proxy = new Proxy ( Proxy.Type.HTTP, proxyAddress );

URL url = new URL ( "XXXXXXXX" );

HttpURLConnection httpConn = (HttpURLConnection) url.openConnection( proxy );

but failed aggin....

[642 byte] By [URLConnectiona] at [2007-11-26 17:34:43]
# 1
You can't set the local bind address in the URLConnection classes in the Standard JDK. Check out Apaches HTTPClient.
masijade.a at 2007-7-9 0:02:44 > top of Java-index,Core,Core APIs...