org.apache.commons.httpclient
Class Header
java.lang.Object
|
+--org.apache.commons.httpclient.NameValuePair
|
+--org.apache.commons.httpclient.Header
- All Implemented Interfaces:
- Serializable
- public class Header
- extends NameValuePair
An HTTP header.
- Version:
- $Revision: 1.10.2.3 $ $Date: 2004/02/22 18:21:13 $
- Author:
- Remy Maucherat, Mike Bowler
- See Also:
- Serialized Form
Header
public Header()
- Default constructor.
Header
public Header(String name,
String value)
- Constructor with name and value
- Parameters:
name
- the header namevalue
- the header value
toExternalForm
public String toExternalForm()
- Returns a
String
representation of the header in the form:
Name: valueCRLF
The string is terminated by CRLF.
- Returns:
- stringHEAD
toString
public String toString()
- Returns a
String
representation of the header.
- Overrides:
toString
in class NameValuePair
- Returns:
- stringHEAD
getValues
public HeaderElement[] getValues()
throws HttpException
- Returns an array of
HeaderElement
s
constructed from my value.
- Returns:
- an array of header elements
- Throws:
HttpException
- if the header cannot be parsed- See Also:
HeaderElement.parse(java.lang.String)
Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.