FileDocCategorySizeDatePackage
NetworkResponse.javaAPI DocAndroid 5.1 API2000Thu Mar 12 22:22:56 GMT 2015com.android.volley

NetworkResponse

public class NetworkResponse extends Object
Data and headers returned from {@link Network#performRequest(Request)}.

Fields Summary
public final int
statusCode
The HTTP status code.
public final byte[]
data
Raw data from this response.
public final Map
headers
Response headers.
public final boolean
notModified
True if the server returned a 304 (Not Modified).
Constructors Summary
public NetworkResponse(int statusCode, byte[] data, Map headers, boolean notModified)
Creates a new network response.

param
statusCode the HTTP status code
param
data Response body
param
headers Headers returned with this response, or null for none
param
notModified True if the server returned a 304 and the data was already in cache

        this.statusCode = statusCode;
        this.data = data;
        this.headers = headers;
        this.notModified = notModified;
    
public NetworkResponse(byte[] data)

        this(HttpStatus.SC_OK, data, Collections.<String, String>emptyMap(), false);
    
public NetworkResponse(byte[] data, Map headers)

        this(HttpStatus.SC_OK, data, headers, false);
    
Methods Summary