public interface StatusLine
StatusLine
is used to represent a HTTP status
line. This provides several convenience methods that can be used
to manipulate a HTTP status line. see the RFC (RFC 2616) for the
syntax of a status line.Modifier and Type | Method and Description |
---|---|
int |
getCode()
This represents the status code of the HTTP response.
|
String |
getDescription()
This can be used to retrieve the text of a HTTP status
line.
|
int |
getMajor()
This can be used to get the major number from a HTTP
version.
|
int |
getMinor()
This can be used to get the minor number from a HTTP
version.
|
Status |
getStatus()
This is used to acquire the status from the response.
|
void |
setCode(int code)
This method allows the status for the response to be
changed.
|
void |
setDescription(String text)
This is used to set the text of the HTTP status line.
|
void |
setMajor(int major)
This can be used to specify the major version.
|
void |
setMinor(int minor)
This can be used to specify the minor version.
|
void |
setStatus(Status status)
This is used to set the status code and description
for this response.
|
int getCode()
void setCode(int code)
code
- the new status code for the HTTP responseString getDescription()
void setDescription(String text)
text
- the descriptive text message of the statusStatus getStatus()
Status
object returns represents the
code that has been set on the response, it does not
necessarily represent the description in the response.void setStatus(Status status)
status
- this is the status to set on the responseint getMajor()
void setMajor(int major)
major
- this is the major number desiredint getMinor()
void setMinor(int minor)
minor
- this is the minor number desiredCopyright © 2024. All rights reserved.