Top Description Fields Constructors Methods
org.apache.hc.core5.http2.protocol

public Class H2ResponseContent

extends ResponseContent
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE
Imports
java.io.IOException, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpResponse, .ProtocolVersion, org.apache.hc.core5.http.message.MessageSupport, org.apache.hc.core5.http.protocol.HttpContext, .ResponseContent, org.apache.hc.core5.util.Args

HTTP/2 compatible extension of ResponseContent.
Since
5.0

Field Summary

Modifier and TypeField and Description
public static final H2ResponseContent
INSTANCE

Singleton instance.

Constructor Summary

AccessConstructor and Description
public
public
H2ResponseContent(final boolean overwrite)

Method Summary

Modifier and TypeMethod and Description
public void
process(final HttpResponse
The HttpResponse to modify.
response
,
final EntityDetails
the request entity details or null if not available
entity
,
final HttpContext
Unused.
context
)

Overrides org.apache.hc.core5.http.protocol.ResponseContent.process.

Implements org.apache.hc.core5.http.HttpResponseInterceptor.process.

Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.

Field Detail

INSTANCEback to summary
public static final H2ResponseContent INSTANCE

Singleton instance.

Since
5.2

Constructor Detail

H2ResponseContentback to summary
public H2ResponseContent()
H2ResponseContentback to summary
public H2ResponseContent(final boolean overwrite)

Method Detail

processback to summary
public void process(final HttpResponse response, final EntityDetails entity, final HttpContext context) throws HttpException, IOException

Overrides org.apache.hc.core5.http.protocol.ResponseContent.process.

Implements org.apache.hc.core5.http.HttpResponseInterceptor.process.

Doc from org.apache.hc.core5.http.protocol.ResponseContent.process.

Processes the response (possibly updating or inserting) Content-Length and Transfer-Encoding headers.

Parameters
response:HttpResponse

The HttpResponse to modify.

entity:EntityDetails

Doc from org.apache.hc.core5.http.HttpResponseInterceptor.process.

the request entity details or null if not available

context:HttpContext

Unused.

Annotations
@Override
Exceptions
HttpException:

Doc from org.apache.hc.core5.http.HttpResponseInterceptor.process.

in case of an HTTP protocol violation

IOException:

Doc from org.apache.hc.core5.http.HttpResponseInterceptor.process.

in case of an I/O error