public class HttpResponseWrapper extends AbstractMessageWrapper<HttpResponse> implements HttpResponse
HttpResponse
.
HttpResponse
wrapper.Constructor and Description |
---|
HttpResponseWrapper(HttpResponse message) |
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Obtains the code of this response message.
|
Locale |
getLocale()
Obtains the locale of this response.
|
String |
getReasonPhrase()
Obtains the reason phrase of this response if available.
|
void |
setCode(int code)
Updates status code of this response message.
|
void |
setLocale(Locale loc)
Changes the locale of this response.
|
void |
setReasonPhrase(String reason)
Updates the status line of this response with a new reason phrase.
|
addHeader, addHeader, containsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, getVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersion, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addHeader, addHeader, getVersion, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersion
containsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator
public HttpResponseWrapper(HttpResponse message)
public int getCode()
HttpResponse
getCode
in interface HttpResponse
HttpStatus
public void setCode(int code)
HttpResponse
setCode
in interface HttpResponse
code
- the HTTP status code.HttpStatus
public String getReasonPhrase()
HttpResponse
getReasonPhrase
in interface HttpResponse
public void setReasonPhrase(String reason)
HttpResponse
setReasonPhrase
in interface HttpResponse
reason
- the new reason phrase as a single-line string, or
null
to unset the reason phrasepublic Locale getLocale()
HttpResponse
status code
.
It can be changed using setLocale
.getLocale
in interface HttpResponse
null
public void setLocale(Locale loc)
HttpResponse
setLocale
in interface HttpResponse
loc
- the new localeCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.