|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An HTTP response.
Method Summary | |
HttpEntity |
getEntity()
Obtains the message entity of this response, if any. |
java.util.Locale |
getLocale()
Obtains the locale of this response. |
StatusLine |
getStatusLine()
Obtains the status line of this response. |
void |
setEntity(HttpEntity entity)
Associates a response entity with this response. |
void |
setLocale(java.util.Locale loc)
Changes the locale of this response. |
void |
setReasonPhrase(java.lang.String reason)
Updates the status line of this response with a new reason phrase. |
void |
setStatusCode(int code)
Updates the status line of this response with a new status code. |
void |
setStatusLine(HttpVersion ver,
int code)
Sets the status line of this response. |
void |
setStatusLine(HttpVersion ver,
int code,
java.lang.String reason)
Sets the status line of this response with a reason phrase. |
void |
setStatusLine(StatusLine statusline)
Sets the status line of this response. |
Methods inherited from interface org.apache.http.HttpMessage |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getHttpVersion, getLastHeader, getParams, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams |
Method Detail |
public StatusLine getStatusLine()
setStatusLine
methods,
or it can be initialized in a constructor.
null
if not yet setpublic void setStatusLine(StatusLine statusline)
statusline
- the status line of this responsepublic void setStatusLine(HttpVersion ver, int code)
locale
.
ver
- the HTTP versioncode
- the status codepublic void setStatusLine(HttpVersion ver, int code, java.lang.String reason)
ver
- the HTTP versioncode
- the status codereason
- the reason phrase, or null
to omitpublic void setStatusCode(int code) throws java.lang.IllegalStateException
locale
. It can be set
explicitly using setReasonPhrase
.
code
- the HTTP status code.
java.lang.IllegalStateException
- if the status line has not be setHttpStatus
,
setStatusLine(StatusLine)
,
setStatusLine(HttpVersion,int)
public void setReasonPhrase(java.lang.String reason) throws java.lang.IllegalStateException
reason
- the new reason phrase as a single-line string, or
null
to unset the reason phrase
java.lang.IllegalStateException
- if the status line has not be setsetStatusLine(StatusLine)
,
setStatusLine(HttpVersion,int)
public HttpEntity getEntity()
setEntity
.
null
if there is nonepublic void setEntity(HttpEntity entity)
entity
- the entity to associate with this response, or
null
to unsetpublic java.util.Locale getLocale()
status code
.
It can be changed using setLocale
.
null
public void setLocale(java.util.Locale loc)
loc
- the new localegetLocale
,
setStatusCode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |