/* ReadURL.java reads a file from a remote web server */

import java.net.*;
import java.io.*;

public class ReadURL {
    public static void main(String[] args) throws IOException {

	//use any internet address instead of pc230 below.
	URL myhost = new URL("http://pc230/index.html");
	BufferedReader in = new BufferedReader(
				new InputStreamReader(
				myhost.openStream()));
	String inputLine;

	while((inputLine = in.readLine()) != null)
		System.out.println(inputLine);
	in.close();
    }
}


