|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.commons.http.HttpHeaderList
public class HttpHeaderList
Represents HTTP transport headers in the format of header name to header value pairs.
| Field Summary | |
|---|---|
static String |
CONTENT_TRANSFER_ENCODING_HEADER
The content transfer encoding HTTP header. |
static String |
HEADER_KEY_VALUE_SEPARATOR
The key-value separator for HTTP headers. |
static String |
PUSH_MESSAGE_ID
The push message id HTTP header (push id). |
| Constructor Summary | |
|---|---|
HttpHeaderList()
Constructs an HTTP header list. |
|
| Method Summary | |
|---|---|
void |
addHeader(String headerName,
String headerValue)
Adds a header value to an existing header in the list or creates the header and adds it to the list if it does not already exist. |
boolean |
containsHeader(String headerName)
Whether or not the header list contains the given header name. |
String |
getHeader(String headerName)
Gets the first header value for the given header name. |
Set<String> |
getHeaderNames()
Gets the names of the headers in the header list. |
List<String> |
getHeaders(String headerName)
Gets the list of values for the given header name. |
void |
setHeader(String headerName,
String headerValue)
Creates a header with the given header name and value and adds it to the list. |
int |
size()
Gets the number of headers in the header list. |
String |
toString()
Constructs a String with all attributes in name = value format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTENT_TRANSFER_ENCODING_HEADER
public static final String HEADER_KEY_VALUE_SEPARATOR
public static final String PUSH_MESSAGE_ID
| Constructor Detail |
|---|
public HttpHeaderList()
| Method Detail |
|---|
public int size()
public Set<String> getHeaderNames()
public String getHeader(String headerName)
headerName - the header name
headerName is nullpublic List<String> getHeaders(String headerName)
headerName - the header name
headerName is nullpublic boolean containsHeader(String headerName)
headerName - the header name
public void addHeader(String headerName,
String headerValue)
headerName - the header nameheaderValue - the header value
public void setHeader(String headerName,
String headerValue)
headerName - the header nameheaderValue - the header valuepublic String toString()
String with all attributes in name = value format.
toString in class ObjectString representation of this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||