|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.io.messaging.Headers
public class Headers
Encapsulates the headers attached to a Message
.
Constructor Summary | ||
---|---|---|
Headers(Hashtable headers)
Constructs a Headers from header key-value pairs specified in a Hashtable . |
Method Summary | ||
---|---|---|
String |
getHeader(String key)
Returns a particular header value by name. |
|
String[] |
getHeadersForKey(String key)
Returns all header values for a particular header key. |
|
Enumeration |
headerKeys()
Returns an enumeration representing all header keys. |
|
void |
setHeader(String key,
String value)
Sets a header to a particular value. |
|
void |
setHeader(String key,
String[] values)
Sets a header with multiple values. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Headers(Hashtable headers)
Headers
from header key-value pairs specified in a Hashtable
.
headers
- Key-value pairs of headers.Method Detail |
---|
public Enumeration headerKeys()
public String getHeader(String key)
key
- Name of the header to retrieve.
public String[] getHeadersForKey(String key)
key
- Name of the header.
Array
of all values for the header.public void setHeader(String key, String value)
key
- Name of the header.value
- Value to set in the header.public void setHeader(String key, String[] values)
key
- Name of the header.values
- Array
of values to set in the header.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.