import java.io.*;
import java.net.*;

public class PrintURL {
  public static void main (String[] args) {
    String thisLine;
    String thisURL="http://java.sun.com/products/jdk/1.1/README";
    
    System.out.println("*** Connecting to " + thisURL);
    System.out.println();
    try {
      BufferedReader in = new BufferedReader (
        new InputStreamReader 
          ( (new URL(thisURL)).openStream(), "8859_1" ) );
      while( (thisLine = in.readLine()) != null ) {
        System.out.println(thisLine);
      }
      in.close();
      System.out.println();
      System.out.println("*** Connection finished.");
    } catch (Exception e) {
        System.out.println("error " + e);
    }
  }
}

