com.android.volley.toolbox
Class JsonArrayRequest

java.lang.Object
  extended by com.android.volley.Request<T>
      extended by com.android.volley.toolbox.JsonRequest<JSONArray>
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.volley.Request
Request.Method, Request.Priority
 
Constructor Summary
JsonArrayRequest(String url, Response.Listener<JSONArray> listener, Response.ErrorListener errorListener)
          Creates a new request.
 
Method Summary
protected  Response<JSONArray> parseNetworkResponse(NetworkResponse response)
          Subclasses must implement this to parse the raw network response and return an appropriate response type.
 
Methods inherited from class com.android.volley.toolbox.JsonRequest
deliverResponse, getBody, getBodyContentType, getPostBody, getPostBodyContentType
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonArrayRequest

public JsonArrayRequest(String url,
                        Response.Listener<JSONArray> listener,
                        Response.ErrorListener errorListener)
Creates a new request.

Parameters:
url - URL to fetch the JSON from
listener - Listener to receive the JSON response
errorListener - Error listener, or null to ignore errors.
Method Detail

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