Lo avete cercato nella documentazione ? NON c'é! (o almeno io proprio non l'ho trovato!)
Ma nei TIP di javaworld ho trovato :
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "myProxyMachineName" );
System.getProperties().put( "proxyPort", "85" );
URL aurl = new URL("http://2006torino.blogspot.com");
BufferedReader d= new BufferedReader(
new InputStreamReader(
aurl.openStream()));
String line = d.readLine();
while(line!=null){
System.out.println(line);
line = d.readLine();
}
e FUNZIONA!

1 commento:
Posta un commento