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

public Class DefaultH2ResponseConverter

extends Object
implements H2MessageConverter<HttpResponse>
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http2.H2MessageConverter
Imports
java.util.ArrayList, .Iterator, .List, org.apache.hc.core5.http.Header, .HttpException, .HttpHeaders, .HttpResponse, .HttpVersion, .ProtocolException, org.apache.hc.core5.http.message.BasicHeader, .BasicHttpResponse, org.apache.hc.core5.http2.H2MessageConverter, .H2PseudoResponseHeaders, org.apache.hc.core5.util.TextUtils

HTTP/2 response converter.
Since
5.0

Field Summary

Modifier and TypeField and Description
public static final DefaultH2ResponseConverter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public HttpResponse
convert(final List<Header>
list of HTTP/2 headers
headers
)

Implements org.apache.hc.core5.http2.H2MessageConverter.convert, org.apache.hc.core5.http2.H2MessageConverter.convert.

Converts given list of HTTP/2 headers to a HttpMessage.
public List<Header>
convert(final HttpResponse
HTTP message
message
)

Implements org.apache.hc.core5.http2.H2MessageConverter.convert.

Converts given HttpMessage to a list of HTTP/2 headers.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final DefaultH2ResponseConverter INSTANCE

Constructor Detail

DefaultH2ResponseConverterback to summary
public DefaultH2ResponseConverter()

Method Detail

convertback to summary
public HttpResponse convert(final List<Header> headers) throws HttpException

Implements org.apache.hc.core5.http2.H2MessageConverter.convert, org.apache.hc.core5.http2.H2MessageConverter.convert.

Doc from org.apache.hc.core5.http2.H2MessageConverter.convert.

Converts given list of HTTP/2 headers to a HttpMessage.

Parameters
headers:List<Header>

list of HTTP/2 headers

Returns:HttpResponse

HTTP message

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation
convertback to summary
public List<Header> convert(final HttpResponse message) throws HttpException

Implements org.apache.hc.core5.http2.H2MessageConverter.convert.

Doc from org.apache.hc.core5.http2.H2MessageConverter.convert.

Converts given HttpMessage to a list of HTTP/2 headers.

Parameters
message:HttpResponse

HTTP message

Returns:List<Header>

list of HTTP/2 headers

Annotations
@Override
Exceptions
HttpException:
in case of HTTP protocol violation