Package com.batch.android.post
Class JSONPostDataProvider
- java.lang.Object
-
- com.batch.android.post.JSONPostDataProvider
-
- All Implemented Interfaces:
PostDataProvider<JSONObject>
public class JSONPostDataProvider extends java.lang.Object implements PostDataProvider<JSONObject>
A json post data provider
-
-
Constructor Summary
Constructors Constructor Description JSONPostDataProvider()Create a new provider with empty dataJSONPostDataProvider(JSONObject data)Create a new provider with given data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Get the content type of the databyte[]getData()Get the dataJSONObjectgetRawData()Get modifiable raw data.
The given data should be modifiable.
-
-
-
Constructor Detail
-
JSONPostDataProvider
public JSONPostDataProvider()
Create a new provider with empty data
-
JSONPostDataProvider
public JSONPostDataProvider(JSONObject data)
Create a new provider with given data- Parameters:
data-
-
-
Method Detail
-
getData
public byte[] getData()
Description copied from interface:PostDataProviderGet the data- Specified by:
getDatain interfacePostDataProvider<JSONObject>- Returns:
-
getContentType
public java.lang.String getContentType()
Description copied from interface:PostDataProviderGet the content type of the data- Specified by:
getContentTypein interfacePostDataProvider<JSONObject>- Returns:
-
getRawData
public JSONObject getRawData()
Description copied from interface:PostDataProviderGet modifiable raw data.
The given data should be modifiable.- Specified by:
getRawDatain interfacePostDataProvider<JSONObject>- Returns:
-
-