public class JSONObjectResponseHandler extends ResponseHandler<JSONObject>
JsonResponseHandler| Constructor and Description |
|---|
JSONObjectResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateContent()
Generate the JSONObject from the buffer and remove it to allow the GC to clean up properly
|
JSONObject |
getContent()
Gets the content generated from the
response.
|
void |
onByteChunkReceived(byte[] chunk,
long chunkLength,
long totalProcessed,
long totalLength)
Called when a chunk has been downloaded from the request.
|
beforeFinish, beforeResponse, getConnectionInfo, onByteChunkReceivedProcessed, onByteChunkSent, onByteChunkSentProcessed, onFailure, onFinish, onReceiveStream, onSend, onSuccesspublic void onByteChunkReceived(byte[] chunk,
long chunkLength,
long totalProcessed,
long totalLength)
ResponseHandleronByteChunkReceived in class ResponseHandler<JSONObject>chunk - The chunk of data. This will be the null after the total amount has been downloaded.chunkLength - The length of the chunktotalProcessed - The total amount of data processed from the request.totalLength - The total size of the request. note: This can be
-1 during download.public void generateContent()
generateContent in class ResponseHandler<JSONObject>public JSONObject getContent()
ResponseHandlergetContent in class ResponseHandler<JSONObject>