org.apache.commons.httpclient
Class Header

java.lang.Object
  |
  +--org.apache.commons.httpclient.NameValuePair
        |
        +--org.apache.commons.httpclient.Header

public class Header
extends NameValuePair

An HTTP header.

Version:
$Revision: 1.10 $ $Date: 2003/01/28 04:40:20 $
Author:
Remy Maucherat, Mike Bowler
See Also:
Serialized Form

Constructor Summary
Header()
          Default constructor.
Header(String name, String value)
          Constructor with name and value
 
Method Summary
 HeaderElement[] getValues()
          Returns an array of HeaderElements constructed from my value.
 String toExternalForm()
          Get a String representation of me, suitable for use in an HTTP head.
 String toString()
          Returns a String representation of me.
 
Methods inherited from class org.apache.commons.httpclient.NameValuePair
equals, getName, getValue, hashCode, setName, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Header

public Header()
Default constructor.

Header

public Header(String name,
              String value)
Constructor with name and value
Parameters:
name - the header name
value - the header value
Method Detail

toExternalForm

public String toExternalForm()
Get a String representation of me, suitable for use in an HTTP head.
Returns:
string value for a HTTP HEAD

toString

public String toString()
Returns a String representation of me.
Overrides:
toString in class NameValuePair
Returns:
String representation
See Also:
toExternalForm()

getValues

public HeaderElement[] getValues()
                          throws HttpException
Returns an array of HeaderElements constructed from my value.
Returns:
an array of header elements
Throws:
HttpException - When ? occurs
See Also:
HeaderElement.parse(java.lang.String)


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.