package br.senacpos.turma02;

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

public class HttpClient {
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		if (args.length == 0) {
			System.err.println("Forneça o endereço da página.");
			return;
		}
		URL url = new URL(args[0]);
		
		InputStream is = url.openStream();
		Reader r = new InputStreamReader(is);
		BufferedReader br = new BufferedReader(r);
		
		String l;
		while ((l = br.readLine()) != null) {
			System.out.println(l);
		}
	}
}

