public class BasicClassicHttpResponse extends BasicHttpResponse implements ClassicHttpResponse
ClassicHttpResponse.| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 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 在接口中 HttpEntityContainerentity - the entity to set of this message, or null to unsetpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2023. All rights reserved.