public abstract class StreamResponseHandler<E> extends ResponseHandler<E>
| Modifier and Type | Field and Description |
|---|---|
protected InputStreamReader |
reader |
| Constructor and Description |
|---|
StreamResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onReceiveStream(InputStream stream,
ClientTaskImpl client,
long totalLength)
Called when processing the response from a stream.
|
beforeFinish, beforeResponse, generateContent, getConnectionInfo, getContent, onByteChunkReceived, onByteChunkReceivedProcessed, onByteChunkSent, onByteChunkSentProcessed, onFailure, onFinish, onSend, onSuccessprotected InputStreamReader reader
public void onReceiveStream(InputStream stream, ClientTaskImpl client, long totalLength) throws Exception
ResponseHandlerResponseHandler.onByteChunkReceived(byte[], long, long, long)onReceiveStream in class ResponseHandler<E>stream - The response InputStreamclient - The client task. In order to call
ResponseHandler.onByteChunkReceivedProcessed(long, long), you must call
client.postPublishProgress(new Packet(int readCount, int totalLength, boolean isDownload))
This is required when displaying a progress indicator.totalLength - The total length of the streamSocketTimeoutExceptionException