net.rim.device.api.io.http
Class HttpHeaders

java.lang.Object
  extended by net.rim.device.api.io.http.HttpHeaders
All Implemented Interfaces:
HttpProtocolConstants, Persistable

public final class HttpHeaders
extends Object
implements HttpProtocolConstants, Persistable

Stores header properties for HTTP connections sent or received from an HTTP server.

The HttpConnection implementation uses these objects internally to store the set of properties that are either sent to or received from an HTTP server.

Content protection
By default, HttpHeaders are not protected via content protection. However, to invoke protection a single call to reCrypt will ensure that all of the values stored in this class are encrypted. As well, all future additions of data to the class will be protected.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
 
Fields inherited from interface net.rim.device.api.io.http.HttpProtocolConstants
CONTENT_TYPE_APPLICATION_ATOM_PLUS_XML, CONTENT_TYPE_APPLICATION_ECMASCRIPT, CONTENT_TYPE_APPLICATION_JAVASCRIPT, CONTENT_TYPE_APPLICATION_JAVA_VM, CONTENT_TYPE_APPLICATION_PKCS7_MIME, CONTENT_TYPE_APPLICATION_RSS_PLUS_XML, CONTENT_TYPE_APPLICATION_STAR, CONTENT_TYPE_APPLICATION_VND_OMA_DD_XML, CONTENT_TYPE_APPLICATION_VND_OMA_DRM_CONTENT, CONTENT_TYPE_APPLICATION_VND_OMA_DRM_MESSAGE, CONTENT_TYPE_APPLICATION_VND_OMA_DRM_RIGHTS_PLUS_WBXML, CONTENT_TYPE_APPLICATION_VND_OMA_DRM_RIGHTS_PLUS_XML, CONTENT_TYPE_APPLICATION_VND_OMA_DRM_ROAP_TRIGGER_WBXML, CONTENT_TYPE_APPLICATION_VND_SYNCML_DM_PLUS_WBXML, CONTENT_TYPE_APPLICATION_VND_SYNCML_DM_PLUS_XML, CONTENT_TYPE_APPLICATION_VND_SYNCML_NOTIFICATION, CONTENT_TYPE_APPLICATION_VND_WAP_CERT_RESPONSE, CONTENT_TYPE_APPLICATION_VND_WAP_COC, CONTENT_TYPE_APPLICATION_VND_WAP_CONNECTIVITY_WBXML, CONTENT_TYPE_APPLICATION_VND_WAP_HASHED_CERTIFICATE, CONTENT_TYPE_APPLICATION_VND_WAP_LOCC_PLUS_WBXML, CONTENT_TYPE_APPLICATION_VND_WAP_LOC_PLUS_XML, CONTENT_TYPE_APPLICATION_VND_WAP_MMS_MESSAGE, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_ALTERNATIVE, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_BYTERANGES, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_FORM_DATA, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_MIXED, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_RELATED, CONTENT_TYPE_APPLICATION_VND_WAP_MULTIPART_STAR, CONTENT_TYPE_APPLICATION_VND_WAP_ROLLOVER_CERTIFICATE, CONTENT_TYPE_APPLICATION_VND_WAP_SIA, CONTENT_TYPE_APPLICATION_VND_WAP_SIC, CONTENT_TYPE_APPLICATION_VND_WAP_SIGNED_CERTIFICATE, CONTENT_TYPE_APPLICATION_VND_WAP_SLC, CONTENT_TYPE_APPLICATION_VND_WAP_UAPROF, CONTENT_TYPE_APPLICATION_VND_WAP_WBXML, CONTENT_TYPE_APPLICATION_VND_WAP_WMLC, CONTENT_TYPE_APPLICATION_VND_WAP_WMLSCRIPTC, CONTENT_TYPE_APPLICATION_VND_WAP_WML_PLUS_XML, CONTENT_TYPE_APPLICATION_VND_WAP_WTA_EVENTC, CONTENT_TYPE_APPLICATION_VND_WAP_WTLS_CA_CERTIFICATE, CONTENT_TYPE_APPLICATION_VND_WAP_WTLS_USER_CERTIFICATE, CONTENT_TYPE_APPLICATION_VND_WAP_XHTML_PLUS_XML, CONTENT_TYPE_APPLICATION_VND_WV_CSP_CIR, CONTENT_TYPE_APPLICATION_WML_PLUS_XML, CONTENT_TYPE_APPLICATION_XHTML_PLUS_XML, CONTENT_TYPE_APPLICATION_XML, CONTENT_TYPE_APPLICATION_X_HDMLC, CONTENT_TYPE_APPLICATION_X_JAVASCRIPT, CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED, CONTENT_TYPE_APPLICATION_X_X509_CA_CERT, CONTENT_TYPE_APPLICATION_X_X509_USER_CERT, CONTENT_TYPE_APPLICATION_X_X968_CA_CERT, CONTENT_TYPE_APPLICATION_X_X968_CROSS_CERT, CONTENT_TYPE_APPLICATION_X_X968_USER_CERT, CONTENT_TYPE_IMAGE_BMP, CONTENT_TYPE_IMAGE_GIF, CONTENT_TYPE_IMAGE_JPEG, CONTENT_TYPE_IMAGE_PNG, CONTENT_TYPE_IMAGE_STAR, CONTENT_TYPE_IMAGE_SVG_PLUS_XML, CONTENT_TYPE_IMAGE_TIFF, CONTENT_TYPE_IMAGE_VND_WAP_WBMP, CONTENT_TYPE_MULTIPART_ALTERNATIVE, CONTENT_TYPE_MULTIPART_BYTERANGES, CONTENT_TYPE_MULTIPART_FORM_DATA, CONTENT_TYPE_MULTIPART_MIXED, CONTENT_TYPE_MULTIPART_RELATED, CONTENT_TYPE_MULTIPART_STAR, CONTENT_TYPE_STAR_STAR, CONTENT_TYPE_TEXT_CSS, CONTENT_TYPE_TEXT_ECMASCRIPT, CONTENT_TYPE_TEXT_HTML, CONTENT_TYPE_TEXT_JAVASCRIPT, CONTENT_TYPE_TEXT_JAVASCRIPT_1_1, CONTENT_TYPE_TEXT_JAVASCRIPT_1_2, CONTENT_TYPE_TEXT_JAVASCRIPT_1_3, CONTENT_TYPE_TEXT_JSCRIPT, CONTENT_TYPE_TEXT_LIVESCRIPT, CONTENT_TYPE_TEXT_PLAIN, CONTENT_TYPE_TEXT_STAR, CONTENT_TYPE_TEXT_VND_WAP_CO, CONTENT_TYPE_TEXT_VND_WAP_CONNECTIVITY_XML, CONTENT_TYPE_TEXT_VND_WAP_SI, CONTENT_TYPE_TEXT_VND_WAP_SL, CONTENT_TYPE_TEXT_VND_WAP_WML, CONTENT_TYPE_TEXT_VND_WAP_WMLSCRIPT, CONTENT_TYPE_TEXT_VND_WAP_WTA_EVENT, CONTENT_TYPE_TEXT_XML, CONTENT_TYPE_TEXT_X_HDML, CONTENT_TYPE_TEXT_X_TTML, CONTENT_TYPE_TEXT_X_VCALENDAR, CONTENT_TYPE_TEXT_X_VCARD, HEADER_ACCEPT, HEADER_ACCEPT_CHARSET, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_LANGUAGE, HEADER_ACCEPT_RANGES, HEADER_AGE, HEADER_ALLOW, HEADER_AUTHENTICATE, HEADER_AUTHORIZATION, HEADER_CACHE_CONTROL, HEADER_CONNECTION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_ID, HEADER_CONTENT_LANGUAGE, HEADER_CONTENT_LENGTH, HEADER_CONTENT_LOCATION, HEADER_CONTENT_MD5, HEADER_CONTENT_RANGE, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_COOKIE2, HEADER_DATE, HEADER_ETAG, HEADER_EXPECT, HEADER_EXPIRES, HEADER_FROM, HEADER_HOST, HEADER_IF_MATCH, HEADER_IF_MODIFIED_SINCE, HEADER_IF_NONE_MATCH, HEADER_IF_RANGE, HEADER_IF_UNMODIFIED_SINCE, HEADER_KEEP_ALIVE, HEADER_LAST_MODIFIED, HEADER_LOCATION, HEADER_MAX_FORWARDS, HEADER_PRAGMA, HEADER_PROXY_AUTHENTICATE, HEADER_PROXY_AUTHORIZATION, HEADER_RANGE, HEADER_REFERER, HEADER_RETRY_AFTER, HEADER_SERVER, HEADER_SET_COOKIE, HEADER_SET_COOKIE2, HEADER_TE, HEADER_TRAILER, HEADER_TRANSFER_ENCODING, HEADER_UPGRADE, HEADER_USER_AGENT, HEADER_VARY, HEADER_VIA, HEADER_WARNING, HEADER_X_WAP_CONTENT_URI, HTTP_HEADER_DOUBLE_CRLF, HTTP_HEADER_FIELD_SEPARATOR, HTTP_HEADER_SINGLE_CRLF, HTTP_HEADER_SINGLE_LF, HTTP_HEADER_SINGLE_SPACE, HTTP_HEADER_VALUE_SEPARATOR, HTTP_METHOD_CONNECT, HTTP_METHOD_DELETE, HTTP_METHOD_GET, HTTP_METHOD_HEAD, HTTP_METHOD_OPTIONS, HTTP_METHOD_POST, HTTP_METHOD_PUT, HTTP_METHOD_TRACE, HTTP_MINIMUM_FILE_REQUEST, HTTP_VERSION, HTTP_VERSION_10, HTTP_VERSION_11, HTTP_VERSION_1_0, HTTP_VERSION_1_PREFIX
 
Constructor Summary
Category: Signed HttpHeaders()
          Creates a new, empty, HttpHeaders instance.
Category: Signed HttpHeaders(DataInputStream dins)
          Creates a new HttpHeaders instance parsed from a provided data input stream.
Category: Signed HttpHeaders(Hashtable headers)
          Creates a new HttpHeaders instance from the contents of a provided hashtable.
 
Method Summary
Category: Signed  void addProperty(String key, String value)
          Adds a new key/value pair to the header list.
Category: Signed  boolean checkCrypt()
          Determines if all header values held in this class are properly protected.
Category: Signed  HttpHeaders cloneHeaders()
          Return new copy of this object.
Category: Signed  void fromHashtable(Hashtable ht)
          Reads header data from provided hashtable.
Category: Signed  String getPropertyKey(int position)
          Retrieves the key of the header at the provided position.
Category: Signed  String getPropertyValue(int position)
          Retrieves the value of the header at the provided position.
Category: Signed  String getPropertyValue(String key)
          Retrieves first header property value for provided key.
Category: Signed  Vector getPropertyValues(String key)
          Retrieves all property values for provided key.
Category: Signed  boolean isProtected()
          Determines if the headers have been encrypted via content-protection.
Category: Signed  void reCrypt()
          Encrypt the header values via content protection.
Category: Signed  void readFromStream(DataInputStream aDataInputStream)
          Reads header data from provided stream.
Category: Signed  void removeProperties(String key)
          Removes all header properties identified by provided key.
Category: Signed  void removeProperty(int keyPosition)
          Removes header property identified by provided key position.
Category: Signed  void reset()
          Clears all the current keys and values from the header list.
Category: Signed  void setProperties(HttpHeaders otherHeaders)
          Sets the HTTP headers.
Category: Signed  void setProperty(int keyPosition, String value)
          Sets new value for header at provided key position in the list.
Category: Signed  void setProperty(String key, String value)
          Sets new value for property by key.
Category: Signed  int size()
          Retrieves the number of keys current stored in the header list.
Category: Signed  Hashtable toHashtable()
          Converts this collection of headers into a hashtable.
Category: Signed  void writeTo(OutputStream outs)
          Writes these headers to provided stream.
Category: Signed  void writeToStream(DataOutputStream douts)
          Deprecated. HttpHeaders.writeTo(OutputStream) should be used instead of this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

HttpHeaders

public HttpHeaders()
Creates a new, empty, HttpHeaders instance.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

HttpHeaders

public HttpHeaders(Hashtable headers)
Creates a new HttpHeaders instance from the contents of a provided hashtable.

Parameters:
headers - Hashtable to provide header data.
Throws:
IllegalArgumentException - if the Hashtable contains a non-String object
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

HttpHeaders

public HttpHeaders(DataInputStream dins)
            throws IOException
Creates a new HttpHeaders instance parsed from a provided data input stream.

Parameters:
dins - DataInputStream to provide header data.
Throws:
IOException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Method Detail

getPropertyValue

public String getPropertyValue(String key)
Retrieves first header property value for provided key.

This method retrieves the first property matching your provided key.

Parameters:
key - Key for property to retrieve.
Returns:
Value of the header property associated with provided key, or null if no such property.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getPropertyValues

public Vector getPropertyValues(String key)
Retrieves all property values for provided key.

This method retrieves all properties that match your provided key.

Parameters:
key - Key associated with one or more header properties to retrieve.
Returns:
Vector containing all properties that have an associated key matching your provided key, or null if no such properties exist.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getPropertyValue

public String getPropertyValue(int position)
Retrieves the value of the header at the provided position.

Parameters:
position - Position within the header list to examine.
Returns:
Value of the property occupying your provided position, or null if no such position exists.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getPropertyKey

public String getPropertyKey(int position)
Retrieves the key of the header at the provided position.

Parameters:
position - Position within the header list to examine.
Returns:
Key of the property occupying your provided position, or null if no such position exists.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

size

public int size()
Retrieves the number of keys current stored in the header list.

Returns:
Number of keys currently in the header list.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

reset

public void reset()
Clears all the current keys and values from the header list.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

setProperty

public void setProperty(String key,
                        String value)
Sets new value for property by key.

An application can invoke this method to set its own custom HTTP headers to transmit to the server. If a property with the specified key already exists, this method replaces the old value with the new value. If more than one property with the specified key already exists, only the first one in the list gets its value updated.

Parameters:
key - Key for the value to set.
value - Value to associate with the provided key.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

addProperty

public void addProperty(String key,
                        String value)
Adds a new key/value pair to the header list. An application can use this method to add its own custom HTTP headers to transmit to the server. If a property with the specified key already exists, the new value will still be placed in the list and the old one will remain.

Parameters:
key - Key for the value to set.
value - Value to associate with the provided key.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

setProperty

public void setProperty(int keyPosition,
                        String value)
Sets new value for header at provided key position in the list.

Parameters:
keyPosition - Position of the key in the list to update: if this position does not already exist in the list, this method does nothing.
value - New value to associated with identified key.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

removeProperty

public void removeProperty(int keyPosition)
Removes header property identified by provided key position.

This method removes the property value at your provided key position, and the key itself as well.

Parameters:
keyPosition - Key position of the header property to remove; if this position does not already exist in the list, this method does nothing.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

removeProperties

public void removeProperties(String key)
Removes all header properties identified by provided key.

This method removes all the property values that match the provided key.

Parameters:
key - Key to look for.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0

writeToStream

public void writeToStream(DataOutputStream douts)
                   throws IOException
Deprecated. HttpHeaders.writeTo(OutputStream) should be used instead of this method.

Writes these headers to provided stream.

This method writes out the headers to a provided data output stream; the individual header properties get separated by CRLF pairs.

Parameters:
douts - Output stream to receive the written header data.
Throws:
IOException - If an I/O error occurs.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

writeTo

public void writeTo(OutputStream outs)
             throws IOException
Writes these headers to provided stream.

This method writes out the headers to a provided output stream; the individual header properties get separated by CRLF pairs.

Parameters:
outs - Output stream to receive the written header data.
Throws:
IOException - If an I/O error occurs.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

readFromStream

public void readFromStream(DataInputStream aDataInputStream)
                    throws IOException
Reads header data from provided stream.

This method reads in header data from provided data input stream. Note that the received headers are appended to the headers that already exist in this object's list (if you want to create a new list from this input stream, first invoke HttpHeaders.reset()).

This method assumes the individual header elements in the read list are separated by CRLF pairs.

Parameters:
aDataInputStream - Input stream from which to read the header data.
Throws:
IOException - If an I/O error occurs.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

setProperties

public void setProperties(HttpHeaders otherHeaders)
Sets the HTTP headers. Combines values from the passed in object with the values of this object. If values in 'this' object match values in otherHeaders, the values in 'this' object are removed. This method is useful for handling HTTP 304 response codes when updating data in caches.

Parameters:
otherHeaders - Other HTTP headers to union.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2

toHashtable

public Hashtable toHashtable()
Converts this collection of headers into a hashtable.

Warning: If there are duplicate headers in this object, only the last of each set of duplicate headers gets written into the hashtable.

Returns:
Hashtable containing converted header properties.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

fromHashtable

public void fromHashtable(Hashtable ht)
Reads header data from provided hashtable.

This method reads in header data from a provided hashtable. Note that the receive headers are appended to the headers that already exist in this object's list (if you want to create a new list from this hashtable, first invoke HttpHeaders.reset()).

Parameters:
ht - Hashtable from which to read the header data.
Throws:
IllegalArgumentException - if the Hashtable contains a non-String object
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

isProtected

public boolean isProtected()
Determines if the headers have been encrypted via content-protection.

Returns:
True if header contents have been protected; otherwise, false.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

checkCrypt

public boolean checkCrypt()
Determines if all header values held in this class are properly protected.

Returns:
True if all contained properties are currently encrypted; otherwise, false.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

reCrypt

public void reCrypt()
Encrypt the header values via content protection.

Once this method is invoked, any future data placed in this object will be encrypted by default.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

cloneHeaders

public HttpHeaders cloneHeaders()
Return new copy of this object.

Returns:
A copy of this object.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2





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.