public class ByteArrayResponseHandler extends ResponseHandler<byte[]>
| Constructor and Description |
|---|
ByteArrayResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateContent()
Generate the bitmap from the buffer and remove it to allow the GC to clean up properly
|
byte[] |
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<byte[]>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<byte[]>public byte[] getContent()
ResponseHandlergetContent in class ResponseHandler<byte[]>