* This program is an example from the book "Internet 
 * programming with Java" by Svetlin Nakov. It is freeware. 
 * For more information: http://www.nakov.com/books/inetjava/ 
import java.net.*; 
import java.io.*; 
public class RetrieveURLExample { 
    public static void main(String[] args) throws IOException { 
        URL url = new URL( 
        BufferedReader in = new BufferedReader( 
            new InputStreamReader(url.openStream())); 
        String line; 
        while ((line = in.readLine()) != null) 
Back to Internet Programming with Java books's web site