public class NetworkResponse
extends java.lang.Object
Network.performRequest(Request)
.Modifier and Type | Field and Description |
---|---|
byte[] |
data
Raw data from this response.
|
java.util.Map<java.lang.String,java.lang.String> |
headers
Response headers.
|
long |
networkTimeMs
Network roundtrip time in milliseconds.
|
boolean |
notModified
True if the server returned a 304 (Not Modified).
|
int |
statusCode
The HTTP status code.
|
Constructor and Description |
---|
NetworkResponse(byte[] data) |
NetworkResponse(byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers) |
NetworkResponse(int statusCode,
byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified) |
NetworkResponse(int statusCode,
byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified,
long networkTimeMs)
Creates a new network response.
|
public final int statusCode
public final byte[] data
public final java.util.Map<java.lang.String,java.lang.String> headers
public final boolean notModified
public final long networkTimeMs
public NetworkResponse(int statusCode, byte[] data, java.util.Map<java.lang.String,java.lang.String> headers, boolean notModified, long networkTimeMs)
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 responsepublic NetworkResponse(int statusCode, byte[] data, java.util.Map<java.lang.String,java.lang.String> headers, boolean notModified)
public NetworkResponse(byte[] data)
public NetworkResponse(byte[] data, java.util.Map<java.lang.String,java.lang.String> headers)