public class HttpResponseWrapper extends AbstractMessageWrapper implements 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddHeader, addHeader, getVersion, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersioncontainsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIteratorpublic HttpResponseWrapper(HttpResponse message)
public int getCode()
HttpResponsegetCode in interface HttpResponsepublic void setCode(int code)
HttpResponsesetCode in interface HttpResponsecode - the HTTP status code.HttpStatuspublic String getReasonPhrase()
HttpResponsegetReasonPhrase in interface HttpResponsepublic void setReasonPhrase(String reason)
HttpResponsesetReasonPhrase in interface HttpResponsereason - the new reason phrase as a single-line string, or
null to unset the reason phrasepublic Locale getLocale()
HttpResponsestatus code.
It can be changed using setLocale.getLocale in interface HttpResponsenullpublic void setLocale(Locale loc)
HttpResponsesetLocale in interface HttpResponseloc - the new localeCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.