|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.beans.AbstractBean
org.jdesktop.http.NameValuePair
org.jdesktop.http.Header
public class Header
Represents a header field in an http Request or Response.
| Nested Class Summary | |
|---|---|
static class |
Header.Element
A representation of an Element within a Header. |
| Constructor Summary | |
|---|---|
Header()
Creates a new Header with a null name and value, and no elements. |
|
Header(String name,
String value)
Creates a new Header with the given name and value, and no elements. |
|
Header(String name,
String value,
Header.Element... elements)
Creates a new Header with the given name, value, and elements. |
|
| Method Summary | |
|---|---|
Header.Element[] |
getElements()
Returns an array of Elements for this Header. |
void |
setElements(Header.Element... elements)
Sets the elements. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class org.jdesktop.http.NameValuePair |
|---|
clone, getName, getValue, setName, setValue |
| Methods inherited from class org.jdesktop.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Header()
public Header(String name,
String value)
name - The name. May be null.value - The value. May be null.
public Header(String name,
String value,
Header.Element... elements)
elements is null, then an empty set of elements will be
used instead.
name - The name. May be null.value - The value. May be null.elements - The elements. May be null. If null, then getElements()
will return an empty array, rather than null.| Method Detail |
|---|
public Header.Element[] getElements()
public void setElements(Header.Element... elements)
elements param is null, this will
set the empty set of elements. That is, getElements() will return an
empty array rather than null.
elements - The Elements. May be null. Replaces the old array of elements.public String toString()
java.lang.ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class NameValuePair
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||