public class

NetworkResponse

extends Object
java.lang.Object
   ↳ com.neomades.content.network.NetworkResponse

Class Overview

Data and headers returned from performQuery(ContentQuery).

Summary

Public Constructors
NetworkResponse(int statusCode, byte[] data, Map<StringString> headers, boolean notModified)
Creates a new network response.
NetworkResponse(byte[] data)
Creates a new network response with data.
NetworkResponse(byte[] data, Map<StringString> headers)
Creates a new network response.
Public Methods
String getContentType()
byte[] getData()
Raw data from this response.
Map<StringString> getHeaders()
Response HTTP headers.
int getStatusCode()
The HTTP status code.
boolean notModified()
True if the server returned a 304 (Not Modified).
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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

Creates a new network response.

Parameters
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

public NetworkResponse (byte[] data)

Creates a new network response with data.

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

Creates a new network response.

Parameters
headers HTTP Headers

Public Methods

public String getContentType ()

Returns
  • the response Content-Type

public byte[] getData ()

Raw data from this response.

public Map<StringString> getHeaders ()

Response HTTP headers.

Returns
  • HTTP Headers

public int getStatusCode ()

The HTTP status code.

public boolean notModified ()

True if the server returned a 304 (Not Modified).