Back to project page fh-android-sdk.
The source code is released under:
Copyright (c) 2014 FeedHenry Ltd, All Rights Reserved. Please refer to your contract with FeedHenry for the software license agreement. If you do not have a contract, you do not have a license to use...
If you think the Android project fh-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.feedhenry.sdk; // www .j a v a 2s . c o m import org.json.fh.JSONArray; import org.json.fh.JSONObject; /** * Representing the response data from FeedHenry when an API call is finished */ public class FHResponse { private JSONObject mResults; private JSONArray mResultArray; private Throwable mError; private String mErrorMessage; public FHResponse(JSONObject pResults, JSONArray pResultArray, Throwable e, String pError){ mResults = pResults; mResultArray = pResultArray; mError = e; mErrorMessage = pError; } /** * Get the response data as JSONObject * @return a JSONObject */ public JSONObject getJson(){ return mResults; } /** * Get the response data as JSONArray * @return a JSONArray */ public JSONArray getArray(){ return mResultArray; } /** * Get the error * @return the error */ public Throwable getError(){ return mError; } /** * Get the error message * @return the error message */ public String getErrorMessage(){ return mErrorMessage; } /** * Get the raw response content * @return the raw response content */ public String getRawResponse(){ if(null != mResults){ return mResults.toString(); } else if(null != mResultArray){ return mResultArray.toString(); } else { return mErrorMessage; } } }