|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
com.sonalb.net.http.Header
public class Header
Represents the Header of an HTTP Message. An HTTP header usually consists of two major components:
Constructor Summary | |
---|---|
Header()
Creates an empty Header. |
|
Header(java.util.Collection c)
Creates a Header, and populates it with HeaderEntries from input Collection. |
|
Header(java.lang.String topLine,
java.util.Collection c)
Creates a Header with given top-line, and populates it with HeaderEntries from input Collection. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object entry)
|
boolean |
add(java.lang.String key,
java.lang.String value)
Adds the specified key-value pair to this Header. |
java.lang.Object |
clone()
|
boolean |
containsKey(java.lang.String s)
Checks whether any header entry exists with given key. |
boolean |
containsValue(java.lang.String s)
Checks whether any header entry exists with given value. |
Header |
getEntriesForKey(java.lang.String s)
Returns a Header consisting of all HeaderEntries having given key. |
Header |
getEntriesForValue(java.lang.String s)
Returns a Header consisting of all HeaderEntries having given value. |
HeaderEntry |
getEntryAt(int index)
Returns the entry at specified index. |
HeaderEntry |
getEntryForKey(java.lang.String s,
int j)
Returns the HeaderEntry corresponding to the first occurrence of the given key, after specified index (non-inclusive). |
HeaderEntry |
getEntryForValue(java.lang.String s,
int j)
Returns the HeaderEntry corresponding to the first occurrence of the given value, after specified index (non-inclusive). |
HeaderEntry |
getFirstEntryForKey(java.lang.String s)
Returns the HeaderEntry corresponding to the first occurrence of the given key. |
HeaderEntry |
getFirstEntryForValue(java.lang.String s)
Returns the HeaderEntry corresponding to the first occurrence of the given value. |
java.lang.String |
getHeaderField(int i)
Returns the header value for entry at specified index. |
java.lang.String |
getHeaderFieldKey(int i)
Returns the header key for entry at specified index. |
java.lang.String |
getTopLine()
Gets the top-line of this Header. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
void |
setTopLine(java.lang.String topLine)
Sets the top-line of this Header. |
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class java.util.AbstractCollection |
---|
addAll, clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public Header()
public Header(java.util.Collection c)
c
- the Collection containing HeaderEntry objectspublic Header(java.lang.String topLine, java.util.Collection c)
c
- the Collection containing HeaderEntry objectstopLine
- the top-most line in an HTTP HeaderMethod Detail |
---|
public void setTopLine(java.lang.String topLine)
topLine
- the top-most line in an HTTP Headerpublic java.lang.String getTopLine()
public boolean add(java.lang.String key, java.lang.String value)
public HeaderEntry getEntryAt(int index)
public java.lang.String getHeaderFieldKey(int i)
public java.lang.String getHeaderField(int i)
public boolean containsKey(java.lang.String s)
public boolean containsValue(java.lang.String s)
public HeaderEntry getFirstEntryForKey(java.lang.String s)
public HeaderEntry getFirstEntryForValue(java.lang.String s)
public HeaderEntry getEntryForKey(java.lang.String s, int j)
public HeaderEntry getEntryForValue(java.lang.String s, int j)
public Header getEntriesForKey(java.lang.String s)
public Header getEntriesForValue(java.lang.String s)
public boolean add(java.lang.Object entry)
add
in interface java.util.Collection
add
in class java.util.AbstractCollection
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in class java.util.AbstractCollection
public int size()
size
in interface java.util.Collection
size
in class java.util.AbstractCollection
public java.lang.String toString()
toString
in class java.util.AbstractCollection
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in class java.util.AbstractCollection
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |