public class DefaultResponseHandler extends java.lang.Object implements ResponseHandler
NetworkEventReporter.| Constructor and Description |
|---|
DefaultResponseHandler(NetworkEventReporter eventReporter,
java.lang.String requestId) |
| Modifier and Type | Method and Description |
|---|---|
void |
onEOF()
Signals that EOF has been reached reading the response stream from the network
stack.
|
void |
onError(java.io.IOException e)
Signals that an error occurred while reading the response stream.
|
void |
onRead(int numBytes)
Signal that data has been read from the response stream.
|
void |
onReadDecoded(int numBytes)
Signal that data has been decoded (reversing the response's
Content-Encoding) while
reading a raw stream. |
public DefaultResponseHandler(NetworkEventReporter eventReporter, java.lang.String requestId)
public void onRead(int numBytes)
ResponseHandleronRead in interface ResponseHandlernumBytes - Bytes read from the network stack's stream as established by
NetworkEventReporter.interpretResponseStream(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, com.facebook.stetho.inspector.network.ResponseHandler).public void onReadDecoded(int numBytes)
ResponseHandlerContent-Encoding) while
reading a raw stream. This method is only called when the stream is known to have
a supported encoding. Note that for HTTP, content encoding almost always is used for
some form of response compression.onReadDecoded in interface ResponseHandlernumBytes - Bytes yielded after decoding bytes received from the network stack's
stream.public void onEOF()
ResponseHandleronEOF in interface ResponseHandlerpublic void onError(java.io.IOException e)
ResponseHandleronError in interface ResponseHandler