public class BasicClassicHttpResponse extends BasicHttpResponse implements ClassicHttpResponse
ClassicHttpResponse.| Constructor and Description |
|---|
BasicClassicHttpResponse(int code)
Creates a new response.
|
BasicClassicHttpResponse(int code,
ReasonPhraseCatalog catalog,
Locale locale)
Creates a new response.
|
BasicClassicHttpResponse(int code,
String reasonPhrase)
Creates a new response.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
HttpEntity |
getEntity()
Obtains the message entity, if available.
|
void |
setEntity(HttpEntity entity)
Sets an entity for this message.
|
addHeader, getCode, getLocale, getReason, getReasonPhrase, getVersion, setCode, setHeader, setLocale, setReasonPhrase, setVersion, toStringaddHeader, clear, containsHeader, countHeaders, getCondensedHeader, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator, removeHeader, removeHeaders, removeHeaders, setHeader, setHeadersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCode, getLocale, getReasonPhrase, setCode, setLocale, setReasonPhraseaddHeader, addHeader, getVersion, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersioncontainsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIteratorpublic BasicClassicHttpResponse(int code,
ReasonPhraseCatalog catalog,
Locale locale)
code - the status codecatalog - the reason phrase catalog, or
null to disable automatic
reason phrase lookuplocale - the locale for looking up reason phrases, or
null for the system localepublic BasicClassicHttpResponse(int code,
String reasonPhrase)
code - the status code of the responsereasonPhrase - the reason phrase to the status code, or nullpublic BasicClassicHttpResponse(int code)
code - the status code of the responsepublic HttpEntity getEntity()
HttpEntityContainergetEntity in interface HttpEntityContainernull if not availablepublic void setEntity(HttpEntity entity)
HttpEntityContainerPlease note that if an entity has already been set it is responsibility of the caller to ensure release of the resources that may be associated with that entity.
setEntity in interface HttpEntityContainerentity - the entity to set of this message, or null to unsetpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.