public class CacheResponseHandler extends ResponseHandler<File>
| Constructor and Description |
|---|
CacheResponseHandler(String filePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateContent()
Override this method to efficiently generate your content from any buffers you have have
used.
|
File |
getContent()
Processes the response from the stream.
|
void |
onPublishedDownloadProgress(byte[] chunk,
int chunkLength,
long totalProcessed,
long totalLength)
Called when a chunk has been downloaded from the request.
|
beforeCallback, beforeFinish, getConnectionInfo, onBeginPublishedDownloadProgress, onFailure, onFinish, onFinish, onPublishedDownloadProgress, onPublishedDownloadProgressUI, onPublishedUploadProgress, onPublishedUploadProgress, onPublishedUploadProgressUI, onSend, onSuccesspublic CacheResponseHandler(String filePath)
public void onPublishedDownloadProgress(byte[] chunk,
int chunkLength,
long totalProcessed,
long totalLength)
ResponseHandleronPublishedDownloadProgress in class ResponseHandler<File>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()
ResponseHandlerResponseHandler.onBeginPublishedDownloadProgress(java.io.InputStream, net.callumtaylor.asynchttp.AsyncHttpClient.ClientExecutorTask, long) has finishedgenerateContent in class ResponseHandler<File>public File getContent()
getContent in class ResponseHandler<File>