org.apache.commons.httpclient
Class Header

java.lang.Object
  extended by org.apache.commons.httpclient.NameValuePair
      extended by org.apache.commons.httpclient.Header
All Implemented Interfaces:
Serializable

public class Header
extends NameValuePair

An HTTP header.

Version:
$Revision: 155418 $ $Date: 2005-02-26 14:01:52 +0100 (Sa, 26 Feb 2005) $
Author:
Remy Maucherat, Mike Bowler, Oleg Kalnichevski
See Also:
Serialized Form

Constructor Summary
Header()
          Default constructor.
Header(String name, String value)
          Constructor with name and value
Header(String name, String value, boolean isAutogenerated)
          Constructor with name and value
 
Method Summary
 HeaderElement[] getElements()
          Returns an array of HeaderElements constructed from my value.
 boolean isAutogenerated()
          Returns the value of the auto-generated header flag.
 String toExternalForm()
          Returns a String representation of the header.
 String toString()
          Returns a String representation of the header.
 
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

Header

public Header(String name,
              String value,
              boolean isAutogenerated)
Constructor with name and value

Parameters:
name - the header name
value - the header value
isAutogenerated - true if the header is autogenerated, false otherwise.
Since:
3.0
Method Detail

toExternalForm

public final String toExternalForm()
Returns a String representation of the header.

Returns:
stringHEAD

toString

public String toString()
Returns a String representation of the header.

Overrides:
toString in class NameValuePair
Returns:
stringHEAD

getElements

public HeaderElement[] getElements()
Returns an array of HeaderElements constructed from my value.

Returns:
an array of header elements
Since:
3.0
See Also:
HeaderElement.parseElements(String)

isAutogenerated

public boolean isAutogenerated()
Returns the value of the auto-generated header flag.

Returns:
true if the header is autogenerated, false otherwise.
Since:
3.0


Copyright (c) 1999-2005 - Apache Software Foundation