import java.net.*;
import java.io.*;
/**
* Write a description of class WpageDownloader here.
* Web page downloader * @author (your name)
* @version (a version number or a date) */
public class WpageDownloader {
public static void main(String[] args){
try {
URL url = new URL("http://www.google.it/");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
BufferedReader read = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line = read.readLine();
String html ="";
while(line!=null) { html +=line+'\n';
line = read.readLine();
}
System.out.println(html);
} catch(MalformedURLException ex) { ex.printStackTrace();
} catch(IOException ioex) { ioex.printStackTrace();
} } }