public class StatusLine
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
reason |
private int |
resultCode |
private java.lang.String |
version |
| Constructor and Description |
|---|
StatusLine(java.lang.String version,
int resultCode,
java.lang.String reason)
Create a new
StatusLine with the given response code and reason
string. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getReason()
Retrieves the HTTP reason phrase.
|
int |
getResultCode()
Retrieves the HTTP response code.
|
java.lang.String |
getVersion()
Retrieves the version string.
|
private final java.lang.String version
private final int resultCode
private final java.lang.String reason
public StatusLine(java.lang.String version,
int resultCode,
java.lang.String reason)
StatusLine with the given response code and reason
string.version - the version string (normally "HTTP/1.1" or "HTTP/1.0")resultCode - the HTTP response code (200, 401, etc.)reason - the reason phrase for the codepublic java.lang.String getVersion()
public int getResultCode()
public java.lang.String getReason()