public class BinaryHttpResponseHandler extends AsyncHttpResponseHandler
FAILURE_MESSAGE, FINISH_MESSAGE, START_MESSAGE, SUCCESS_MESSAGE
构造器和说明 |
---|
BinaryHttpResponseHandler()
Creates a new BinaryHttpResponseHandler
|
BinaryHttpResponseHandler(Context context)
Creates a new BinaryHttpResponseHandler with context
|
BinaryHttpResponseHandler(Context context,
String[] allowedContentTypes)
Creates a new BinaryHttpResponseHandler, and overrides the default allowed
content types with passed String array (hopefully) of content types.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
handleFailureMessage(Throwable e,
byte[] responseBody) |
protected void |
handleFailureMessage(Throwable e,
String responseBody) |
protected void |
handleMessage(Message msg) |
protected void |
handleSuccessMessage(int statusCode,
byte[] responseBody) |
void |
onFailure(Throwable error,
byte[] binaryData)
Fired when a request fails to complete, override to handle in your own code
|
void |
onSuccess(byte[] binaryData)
Fired when a request returns successfully, override to handle in your own code
|
void |
onSuccess(int statusCode,
byte[] binaryData)
Fired when a request returns successfully, override to handle in your own code
|
protected void |
sendSuccessMessage(int statusCode,
byte[] responseBody) |
handleSuccessMessage, obtainMessage, onFailure, onFailure, onFinish, onStart, onSuccess, onSuccess, sendFailureMessage, sendFailureMessage, sendFinishMessage, sendMessage, sendStartMessage, sendSuccessMessage
public BinaryHttpResponseHandler()
public BinaryHttpResponseHandler(Context context)
public BinaryHttpResponseHandler(Context context, String[] allowedContentTypes)
public void onSuccess(byte[] binaryData)
binaryData
- the body of the HTTP response from the serverpublic void onSuccess(int statusCode, byte[] binaryData)
statusCode
- the status code of the responsebinaryData
- the body of the HTTP response from the serverpublic void onFailure(Throwable error, byte[] binaryData)
error
- the underlying cause of the failurebinaryData
- the response body, if anyprotected void sendSuccessMessage(int statusCode, byte[] responseBody)
protected void handleSuccessMessage(int statusCode, byte[] responseBody)
protected void handleFailureMessage(Throwable e, byte[] responseBody)
protected void handleMessage(Message msg)