Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

HTTPClient
Class HttpHeaderElement  view HttpHeaderElement download HttpHeaderElement.java

java.lang.Object
  extended byHTTPClient.HttpHeaderElement

public class HttpHeaderElement
extends java.lang.Object

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

Version:
0.3-2 18/06/1999

Field Summary
private  java.lang.String name
          element name
private  NVPair[] parameters
          element parameters
private  java.lang.String value
          element value
 
Constructor Summary
HttpHeaderElement(java.lang.String name)
          Construct an element with the given name.
HttpHeaderElement(java.lang.String name, java.lang.String value, NVPair[] params)
           
 
Method Summary
 void appendTo(java.lang.StringBuffer buf)
          Append this header element to the given buffer.
 boolean equals(java.lang.Object obj)
          Two elements are equal if they have the same name.
 java.lang.String getName()
           
 NVPair[] getParams()
           
 java.lang.String getValue()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name
element name


value

private java.lang.String value
element value


parameters

private NVPair[] parameters
element parameters

Constructor Detail

HttpHeaderElement

public HttpHeaderElement(java.lang.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.


HttpHeaderElement

public HttpHeaderElement(java.lang.String name,
                         java.lang.String value,
                         NVPair[] params)
Method Detail

getName

public java.lang.String getName()

getValue

public java.lang.String getValue()

getParams

public NVPair[] getParams()

equals

public boolean equals(java.lang.Object obj)
Two elements are equal if they have the same name. The comparison is case-insensitive.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


appendTo

public void appendTo(java.lang.StringBuffer buf)
Append this header element to the given buffer. This is basically a more efficient version of toString() for assembling multiple elements.