import java.io.*;
import java.net.*;

public class ViewWeb {
  private URL url;
  public ViewWeb(String webAddress) throws IOException {
    url = new URL(webAddress);
  }
  public void view() throws IOException {
    URLConnection connection = url.openConnection();
    int size = connection.getContentLength();
    InputStream input = connection.getInputStream();
    int data;
    int bytesRead=0;
    StringBuilder buffer = new StringBuilder();
    while (bytesRead < size) {
      data = input.read();
      buffer.append((char)data);
      bytesRead++;
    }
    System.out.print(buffer.toString());
    input.close();
  }
}