com.android.volley.toolbox
Class JsonArrayRequest
java.lang.Object
com.android.volley.Request<T>
com.android.volley.toolbox.JsonRequest<JSONArray>
com.android.volley.toolbox.JsonArrayRequest
- All Implemented Interfaces:
- Comparable<Request<JSONArray>>
public class JsonArrayRequest
- extends JsonRequest<JSONArray>
A request for retrieving a JSONArray
response body at a given URL.
Methods inherited from class com.android.volley.Request |
addMarker, cancel, compareTo, deliverError, getCacheEntry, getCacheKey, getHeaders, getMethod, getParams, getParamsEncoding, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setTag, shouldCache, toString |
JsonArrayRequest
public JsonArrayRequest(String url,
Response.Listener<JSONArray> listener,
Response.ErrorListener errorListener)
- Creates a new request.
- Parameters:
url
- URL to fetch the JSON fromlistener
- Listener to receive the JSON responseerrorListener
- Error listener, or null to ignore errors.
parseNetworkResponse
protected Response<JSONArray> parseNetworkResponse(NetworkResponse response)
- Description copied from class:
Request
- Subclasses must implement this to parse the raw network response
and return an appropriate response type. This method will be
called from a worker thread. The response will not be delivered
if you return null.
- Specified by:
parseNetworkResponse
in class JsonRequest<JSONArray>
- Parameters:
response
- Response from the network
- Returns:
- The parsed response, or null in the case of an error