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

public class AbreHtml 
{
  public static void main (String args[]) 
  {
    String thisLine;
    URL u;
    URLConnection uc;
    if  (args.length > 0) 
    {
      try 
      {
        u = new URL(args[0]);
        try 
        {
          uc = u.openConnection();
          DataInputStream theHTML = new DataInputStream(uc.getInputStream());
          try 
          {
            while ((thisLine = theHTML.readLine()) != null) 
            {
              System.out.println(thisLine);
            } // while loop ends here
          }  // end try
          catch (Exception e) 
          {
            System.err.println(e);
          }
        } // end try
        catch (Exception e) 
        {
          System.err.println(e);
        }

      } // end try
      catch (MalformedURLException e) 
      {
        System.err.println(args[0] + " is not a parseable URL");
        System.err.println(e);
      }
    } //  end if
  } // end main
}  
