Response = Status-Line
*(( general-header
| response-header
| entity-header ) CRLF)
CRLF
[ message-body ]
| Modifier and Type | Method and Description |
|---|---|
| public HttpEntity | Returns: the response entity, ornull if there is noneObtains the message entity of this response, if any. |
| public Locale | |
| public StatusLine | Returns: the status line, ornull if not yet setObtains the status line of this response. |
| public void | setEntity(HttpEntity
the entity to associate with this response, or
entity)null to unsetAssociates a response entity with this response. |
| public void | |
| public void | setReasonPhrase(String
the new reason phrase as a single-line string, or
reason)null to unset the reason phraseUpdates the status line of this response with a new reason phrase. |
| public void | setStatusCode(int
the HTTP status code. code)Updates the status line of this response with a new status code. |
| public void | setStatusLine(StatusLine
the status line of this response statusline)Sets the status line of this response. |
| public void | setStatusLine(ProtocolVersion
the HTTP version ver, int the status code code)Sets the status line of this response. |
| public void | setStatusLine(ProtocolVersion
the HTTP version ver, int the status code code, String the reason phrase, or reason)null to omitSets the status line of this response with a reason phrase. |
| getEntity | back to summary |
|---|---|
| public HttpEntity getEntity() Obtains the message entity of this response, if any.
The entity is provided by calling
| |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Obtains the locale of this response.
The locale is used to determine the reason phrase
for the
| |
| getStatusLine | back to summary |
|---|---|
| public StatusLine getStatusLine() Obtains the status line of this response.
The status line can be set using one of the
| |
| setEntity | back to summary |
|---|---|
| public void setEntity(HttpEntity entity) Associates a response entity with this response.
Please note that if an entity has already been set for this response and it depends on
an input stream (
| |
| setLocale | back to summary |
|---|---|
| public void setLocale(Locale loc) Changes the locale of this response.
| |
| setReasonPhrase | back to summary |
|---|---|
| public void setReasonPhrase(String reason) throws IllegalStateException Updates the status line of this response with a new reason phrase.
| |
| setStatusCode | back to summary |
|---|---|
| public void setStatusCode(int code) throws IllegalStateException Updates the status line of this response with a new status code.
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(StatusLine statusline) Sets the status line of this response.
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(ProtocolVersion ver, int code) Sets the status line of this response.
The reason phrase will be determined based on the current
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(ProtocolVersion ver, int code, String reason) Sets the status line of this response with a reason phrase.
| |