|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.re.net.Headers
public class Headers
Several Internet protocols use headers. This class can be used to manage them. Headers can occur more than once. Even name/value pairs may be dupplicated.
Nested Class Summary | |
---|---|
class |
Headers.Header
Represents one header. |
Constructor Summary | |
---|---|
Headers()
|
Method Summary | |
---|---|
void |
add(Headers headers)
Adds all the headers in headers . |
void |
add(String name,
String value)
Adds a name/value pair. |
void |
clear()
Removes all headers. |
String[] |
get(String name)
Returns all the values for the header name in the order of
appearance. |
Headers.Header[] |
getAll()
Returns all headers. |
String[] |
getValuesFromList(String name)
Returns all the values for the header name in the order of
appearance. |
void |
remove(String name)
Removes all headers with name as their name. |
void |
remove(String name,
String value)
Removes one name/value pair. |
void |
set(String name,
String value)
Replaces all the headers with name as their name with the
given name/value pair. |
void |
set(String name,
String oldValue,
String newValue)
Replaces one name/value pair. |
int |
size()
Returns the number of headers. |
String |
toString()
A string representation of all headers. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Headers()
Method Detail |
---|
public void add(String name, String value)
public void add(Headers headers)
headers
.
public void clear()
public String[] get(String name)
name
in the order of
appearance.
public Headers.Header[] getAll()
public String[] getValuesFromList(String name)
name
in the order of
appearance. If a header value is a comma-separated list, the elements in
the list are added separately in the order of appearance and without
surrounding whitespace.
public void remove(String name)
name
as their name.
public void remove(String name, String value)
public void set(String name, String value)
name
as their name with the
given name/value pair.
public void set(String name, String oldValue, String newValue)
public int size()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |