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 |
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 CacheResponseHandler(String filePath)
public void onByteChunkReceived(byte[] chunk,
long chunkLength,
long totalProcessed,
long totalLength)
ResponseHandleronByteChunkReceived 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.onReceiveStream(java.io.InputStream, net.callumtaylor.asynchttp.obj.ClientTaskImpl, long) has finishedgenerateContent in class ResponseHandler<File>public File getContent()
getContent in class ResponseHandler<File>