类 NetworkResponse
java.lang.Object
com.android.volley.NetworkResponse
Data and headers returned from
Network.performRequest(Request).-
字段概要
字段修饰符和类型字段说明final byte[]Raw data from this response.Response headers.final longNetwork roundtrip time in milliseconds.final booleanTrue if the server returned a 304 (Not Modified).final intThe HTTP status code. -
构造器概要
构造器构造器说明NetworkResponse(byte[] data) NetworkResponse(byte[] data, Map<String, String> headers) NetworkResponse(int statusCode, byte[] data, Map<String, String> headers, boolean notModified) NetworkResponse(int statusCode, byte[] data, Map<String, String> headers, boolean notModified, long networkTimeMs) Creates a new network response. -
方法概要
-
字段详细资料
-
statusCode
public final int statusCodeThe HTTP status code. -
data
public final byte[] dataRaw data from this response. -
headers
Response headers. -
notModified
public final boolean notModifiedTrue if the server returned a 304 (Not Modified). -
networkTimeMs
public final long networkTimeMsNetwork roundtrip time in milliseconds.
-
-
构造器详细资料
-
NetworkResponse
public NetworkResponse(int statusCode, byte[] data, Map<String, String> headers, boolean notModified, long networkTimeMs) Creates a new network response.- 参数:
statusCode- the HTTP status codedata- Response bodyheaders- Headers returned with this response, or null for nonenotModified- True if the server returned a 304 and the data was already in cachenetworkTimeMs- Round-trip network time to receive network response
-
NetworkResponse
-
NetworkResponse
public NetworkResponse(byte[] data) -
NetworkResponse
-