com.duowan.mobile.netroid
Class NetworkResponse

java.lang.Object
  extended by com.duowan.mobile.netroid.NetworkResponse

public class NetworkResponse
extends java.lang.Object

Data and headers returned from Network.performRequest(Request).


Field Summary
 java.lang.String charset
          Charset from this response.
 byte[] data
          Raw data from this response.
 int statusCode
          The HTTP status code.
 
Constructor Summary
NetworkResponse(byte[] data, java.lang.String charset)
           
NetworkResponse(int statusCode, byte[] data, java.lang.String charset)
          Creates a new network response.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statusCode

public final int statusCode
The HTTP status code.


data

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


charset

public final java.lang.String charset
Charset from this response.

Constructor Detail

NetworkResponse

public NetworkResponse(int statusCode,
                       byte[] data,
                       java.lang.String charset)
Creates a new network response.

Parameters:
statusCode - the HTTP status code
data - Response body
charset - The response body charset, parse by http header

NetworkResponse

public NetworkResponse(byte[] data,
                       java.lang.String charset)