| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.protocol.ResponseContent
@Contract(threading=IMMUTABLE) public class ResponseContent
ResponseContent is the most important interceptor for outgoing responses.
 It is responsible for delimiting content length by adding
 Content-Length or Transfer-Content headers based
 on the properties of the enclosed entity and the protocol version.
 This interceptor is required for correct functioning of server side protocol
 processors.
| Constructor Summary | |
|---|---|
| ResponseContent()Default constructor. | |
| ResponseContent(boolean overwrite)Constructor that can be used to fine-tune behavior of this interceptor. | |
| Method Summary | |
|---|---|
|  void | process(HttpResponse response,
        HttpContext context)Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ResponseContent()
Content-Length or Transfer-Encoding
 will cause the interceptor to throw ProtocolException if already present in the
 response message.
public ResponseContent(boolean overwrite)
overwrite - If set to true the Content-Length and
 Transfer-Encoding headers will be created or updated if already present.
 If set to false the Content-Length and
 Transfer-Encoding headers will cause the interceptor to throw
 ProtocolException if already present in the response message.| Method Detail | 
|---|
public void process(HttpResponse response,
                    HttpContext context)
             throws HttpException,
                    IOException
process in interface HttpResponseInterceptorresponse - The HttpResponse to modify.context - Unused.
ProtocolException - If either the Content-Length or Transfer-Encoding headers are found.
IllegalArgumentException - If the response is null.
HttpException - in case of an HTTP protocol violation
IOException - in case of an I/O error| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||