类 NetworkResponse

java.lang.Object
com.android.volley.NetworkResponse

public class NetworkResponse extends Object
Data and headers returned from Network.performRequest(Request).
  • 字段详细资料

    • statusCode

      public final int statusCode
      The HTTP status code.
    • data

      public final byte[] data
      Raw data from this response.
    • headers

      public final Map<String,String> headers
      Response headers.
    • notModified

      public final boolean notModified
      True if the server returned a 304 (Not Modified).
    • networkTimeMs

      public final long networkTimeMs
      Network 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 code
      data - Response body
      headers - Headers returned with this response, or null for none
      notModified - True if the server returned a 304 and the data was already in cache
      networkTimeMs - Round-trip network time to receive network response
    • NetworkResponse

      public NetworkResponse(int statusCode, byte[] data, Map<String,String> headers, boolean notModified)
    • NetworkResponse

      public NetworkResponse(byte[] data)
    • NetworkResponse

      public NetworkResponse(byte[] data, Map<String,String> headers)