org.apache.commons.scaffold.http
Class HttpClient

java.lang.Object
  extended byorg.apache.commons.scaffold.http.HttpClient

public class HttpClient
extends java.lang.Object

A network client that reads from a HTTP URL.

Taken from Core Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.coreservlets.com/. © 2000 Marty Hall; may be freely used or adapted.

Adapted for general use by a servlet to read a page into a StringBuffer by Ted Husted, August 2001.

Version:
$Revision: 1.3 $ $Date: 2004/03/21 21:10:49 $

Constructor Summary
HttpClient(java.lang.String host, int port, java.lang.String requestLine, java.lang.String[] requestHeaders, java.lang.StringBuffer responseHeaders, java.lang.StringBuffer responseContent)
          Retrieve indicated page, returning headers and page content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClient

public HttpClient(java.lang.String host,
                  int port,
                  java.lang.String requestLine,
                  java.lang.String[] requestHeaders,
                  java.lang.StringBuffer responseHeaders,
                  java.lang.StringBuffer responseContent)
           throws java.net.UnknownHostException,
                  java.io.IOException
Retrieve indicated page, returning headers and page content.

Parameters:
host -
port -
requestLine -
requestHeaders -
Throws:
Catches - IOException and UnknownHostException, and returns messages in content.
java.net.UnknownHostException
java.io.IOException


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.