All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class HTTPClient.HttpHeaderElement

java.lang.Object
    |
    +----HTTPClient.HttpHeaderElement

public class HttpHeaderElement
extends Object
This class holds a description of an http header element. It is used by HTTPClient.Util.parseHeader().

Version:
0.3 30/01/1998
Author:
Ronald Tschalär
See Also:
parseHeader, getElement, assembleHeader

Constructor Index

 o HttpHeaderElement(String)
Construct an element with the given name.
 o HttpHeaderElement(String, String, NVPair[])

Method Index

 o equals(Object)
Two elements are equal if they have the same name.
 o getName()
 o getParams()
 o getValue()
 o toString()

Constructors

 o HttpHeaderElement
public HttpHeaderElement(String name)
Construct an element with the given name. The value and parameters are set to null. This can be used when a dummy element is constructed for comparison or retrieval purposes.

Parameters:
name - the name of the element
 o HttpHeaderElement
public HttpHeaderElement(String name,
                         String value,
                         NVPair[] params)
Parameters:
name - the first token in the element
value - the value part, or null
params - the parameters

Methods

 o getName
public String getName()
Returns:
the name
 o getValue
public String getValue()
Returns:
the value
 o getParams
public NVPair[] getParams()
Returns:
the parameters
 o equals
public boolean equals(Object obj)
Two elements are equal if they have the same name. The comparison is case-insensitive.

Parameters:
obj - the object to compare with
Returns:
true if obj is an HttpHeaderElement with the same name as this element.
Overrides:
equals in class Object
 o toString
public String toString()
Returns:
a string containing the HttpHeaderElement formatted as it would appear in a header
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index