Top Description Constructors Methods
org.apache.hc.core5.http.message

public Class HttpResponseWrapper

extends AbstractMessageWrapper<HttpResponse>
implements HttpResponse
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.HttpResponse, org.apache.hc.core5.http.HttpMessage, org.apache.hc.core5.http.MessageHeaders
Imports
java.util.Locale, org.apache.hc.core5.http.HttpResponse

Wraps an HttpResponse. HttpResponse wrapper.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
getCode()

Implements org.apache.hc.core5.http.HttpResponse.getCode.

Obtains the code of this response message.
public Locale
getLocale()

Implements org.apache.hc.core5.http.HttpResponse.getLocale.

Obtains the locale of this response.
public String
getReasonPhrase()

Implements org.apache.hc.core5.http.HttpResponse.getReasonPhrase.

Obtains the reason phrase of this response if available.
public void
setCode(final int
the HTTP status code.
code
)

Implements org.apache.hc.core5.http.HttpResponse.setCode.

Updates status code of this response message.
public void
setLocale(final Locale
the new locale
loc
)

Implements org.apache.hc.core5.http.HttpResponse.setLocale.

Changes the locale of this response.
public void
setReasonPhrase(final String
the new reason phrase as a single-line string, or null to unset the reason phrase
reason
)

Implements org.apache.hc.core5.http.HttpResponse.setReasonPhrase.

Updates the status line of this response with a new reason phrase.
Inherited from org.apache.hc.core5.http.message.AbstractMessageWrapper:
addHeaderaddHeadercontainsHeadercountHeadersgetFirstHeadergetHeadergetHeadersgetHeadersgetLastHeadergetMessagegetVersionheaderIteratorheaderIteratorremoveHeaderremoveHeaderssetHeadersetHeadersetHeaderssetVersiontoString

Constructor Detail

HttpResponseWrapperback to summary
public HttpResponseWrapper(final HttpResponse message)

Method Detail

getCodeback to summary
public int getCode()

Implements org.apache.hc.core5.http.HttpResponse.getCode.

Doc from org.apache.hc.core5.http.HttpResponse.getCode.

Obtains the code of this response message.

Returns:int

the status code.

Annotations
@Override
getLocaleback to summary
public Locale getLocale()

Implements org.apache.hc.core5.http.HttpResponse.getLocale.

Doc from org.apache.hc.core5.http.HttpResponse.getLocale.

Obtains the locale of this response. The locale is used to determine the reason phrase for the status code. It can be changed using setLocale.

Returns:Locale

the locale of this response, never null

Annotations
@Override
getReasonPhraseback to summary
public String getReasonPhrase()

Implements org.apache.hc.core5.http.HttpResponse.getReasonPhrase.

Doc from org.apache.hc.core5.http.HttpResponse.getReasonPhrase.

Obtains the reason phrase of this response if available.

Returns:String

the reason phrase.

Annotations
@Override
setCodeback to summary
public void setCode(final int code)

Implements org.apache.hc.core5.http.HttpResponse.setCode.

Doc from org.apache.hc.core5.http.HttpResponse.setCode.

Updates status code of this response message.

Parameters
code:int

the HTTP status code.

Annotations
@Override
setLocaleback to summary
public void setLocale(final Locale loc)

Implements org.apache.hc.core5.http.HttpResponse.setLocale.

Doc from org.apache.hc.core5.http.HttpResponse.setLocale.

Changes the locale of this response.

Parameters
loc:Locale

the new locale

Annotations
@Override
setReasonPhraseback to summary
public void setReasonPhrase(final String reason)

Implements org.apache.hc.core5.http.HttpResponse.setReasonPhrase.

Doc from org.apache.hc.core5.http.HttpResponse.setReasonPhrase.

Updates the status line of this response with a new reason phrase.

Parameters
reason:String

the new reason phrase as a single-line string, or null to unset the reason phrase

Annotations
@Override