class ResponseEntityProxy extends org.apache.http.entity.HttpEntityWrapper implements EofSensorWatcher
HttpEntity enclosed in a response message.| Modifier and Type | Field and Description |
|---|---|
private ConnectionHolder |
connHolder |
| Constructor and Description |
|---|
ResponseEntityProxy(org.apache.http.HttpEntity entity,
ConnectionHolder connHolder) |
| Modifier and Type | Method and Description |
|---|---|
private void |
abortConnection() |
private void |
cleanup() |
void |
consumeContent() |
static void |
enchance(org.apache.http.HttpResponse response,
ConnectionHolder connHolder) |
boolean |
eofDetected(java.io.InputStream wrapped)
Indicates that EOF is detected.
|
java.io.InputStream |
getContent() |
boolean |
isRepeatable() |
void |
releaseConnection() |
boolean |
streamAbort(java.io.InputStream wrapped)
Indicates that the
stream is aborted. |
boolean |
streamClosed(java.io.InputStream wrapped)
Indicates that the
stream is closed. |
java.lang.String |
toString() |
void |
writeTo(java.io.OutputStream outStream) |
private final ConnectionHolder connHolder
ResponseEntityProxy(org.apache.http.HttpEntity entity,
ConnectionHolder connHolder)
public static void enchance(org.apache.http.HttpResponse response,
ConnectionHolder connHolder)
private void cleanup()
throws java.io.IOException
java.io.IOExceptionprivate void abortConnection()
public void releaseConnection()
public boolean isRepeatable()
isRepeatable in interface org.apache.http.HttpEntityisRepeatable in class org.apache.http.entity.HttpEntityWrapperpublic java.io.InputStream getContent()
throws java.io.IOException
getContent in interface org.apache.http.HttpEntitygetContent in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic void consumeContent()
throws java.io.IOException
consumeContent in interface org.apache.http.HttpEntityconsumeContent in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic void writeTo(java.io.OutputStream outStream)
throws java.io.IOException
writeTo in interface org.apache.http.HttpEntitywriteTo in class org.apache.http.entity.HttpEntityWrapperjava.io.IOExceptionpublic boolean eofDetected(java.io.InputStream wrapped)
throws java.io.IOException
EofSensorWatchereofDetected in interface EofSensorWatcherwrapped - the underlying stream which has reached EOFtrue if wrapped should be closed,
false if it should be left alonejava.io.IOException - in case of an IO problem, for example if the watcher itself
closes the underlying stream. The caller will leave the
wrapped stream alone, as if false was returned.public boolean streamClosed(java.io.InputStream wrapped)
throws java.io.IOException
EofSensorWatcherstream is closed.
This method will be called only if EOF was not detected
before closing. Otherwise, eofDetected is called.streamClosed in interface EofSensorWatcherwrapped - the underlying stream which has not reached EOFtrue if wrapped should be closed,
false if it should be left alonejava.io.IOException - in case of an IO problem, for example if the watcher itself
closes the underlying stream. The caller will leave the
wrapped stream alone, as if false was returned.public boolean streamAbort(java.io.InputStream wrapped)
throws java.io.IOException
EofSensorWatcherstream is aborted.
This method will be called only if EOF was not detected
before aborting. Otherwise, eofDetected is called.
This method will also be invoked when an input operation causes an IOException to be thrown to make sure the input stream gets shut down.
streamAbort in interface EofSensorWatcherwrapped - the underlying stream which has not reached EOFtrue if wrapped should be closed,
false if it should be left alonejava.io.IOException - in case of an IO problem, for example if the watcher itself
closes the underlying stream. The caller will leave the
wrapped stream alone, as if false was returned.public java.lang.String toString()
toString in class java.lang.Object