org.apache.commons.scaffold.http
Class HttpClient

java.lang.Object
  extended by org.apache.commons.scaffold.http.HttpClient

public class HttpClient
extends 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: 155464 $ $Date: 2005-02-26 13:26:54 +0000 (Sat, 26 Feb 2005) $
Author:
Marty Hall, Ted Husted

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

Constructor Detail

HttpClient

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

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


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.