net.rim.blackberry.api.browser
Class PostData
java.lang.Object
net.rim.blackberry.api.browser.PostData
- Direct Known Subclasses:
- MultipartPostData, URLEncodedPostData
public abstract class PostData
- extends Object
Common base class for HTTP POST data.
- 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 Summary |
|
abstract void |
append(String name,
String value)
Appends the given name-value pair to the form data. |
|
abstract byte[] |
getBytes()
Retrieves the form data as a byte array suitable for use as an HTTP
request body. |
|
abstract String |
getContentType()
Retrieves the content type of the form data, including parameters. |
|
abstract void |
setData(Object data)
Sets the form data. |
|
abstract int |
size()
Retrieves the size of the underlying store. |
ENCTYPE_URLENCODED
public static final int ENCTYPE_URLENCODED
- Constant for the form encoding type "application/x-www-form-urlencoded".
- See Also:
- Constant Field Values
- 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
ENCTYPE_MULTIPART_FORMDATA
public static final int ENCTYPE_MULTIPART_FORMDATA
- Constant for the form encoding type "multipart/form-data".
- See Also:
- Constant Field Values
- 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
getContentType
public abstract String getContentType()
- Retrieves the content type of the form data, including parameters.
- 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
append
public abstract void append(String name,
String value)
- Appends the given name-value pair to the form data.
- Parameters:
name
- Name of the form control; if null or "", nothing is added.value
- Value of the form control; a null value is considered
equivalent to "".- 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
setData
public abstract void setData(Object data)
- Sets the form data.
The required encoding and class of the data are defined by the
subclass's implementation of this method.
- Parameters:
data
- Form data.- See Also:
URLEncodedPostData.setData(java.lang.Object)
,
MultipartPostData.setData(java.lang.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
getBytes
public abstract byte[] getBytes()
- Retrieves the form data as a byte array suitable for use as an HTTP
request body.
- Returns:
- Form data.
- 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 abstract int size()
- Retrieves the size of the underlying store.
- Returns:
- Size of the underlying store.
- 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
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal