Class StatusLine
java.lang.Object
com.neovisionaries.ws.client.StatusLine
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the HTTP version.Get the reason phrase.intGet the status code.toString()Get the string representation of this instance, which is equal to the raw status line.
-
Field Details
-
mHttpVersion
HTTP version. -
mStatusCode
private final int mStatusCodeStatus code. -
mReasonPhrase
Reason phrase. -
mString
String representation of this instance (= the raw status line).
-
-
Constructor Details
-
StatusLine
StatusLine(String line) Constructor with a raw status line.- Parameters:
line- A status line.- Throws:
NullPointerException-lineisnullIllegalArgumentException- The number of elements inlineis less than 2.NumberFormatException- Failed to parse the second element inlineas an integer.
-
-
Method Details
-
getHttpVersion
Get the HTTP version.- Returns:
- The HTTP version. For example,
"HTTP/1.1".
-
getStatusCode
public int getStatusCode()Get the status code.- Returns:
- The status code. For example,
404.
-
getReasonPhrase
Get the reason phrase.- Returns:
- The reason phrase. For example,
"Not Found".
-
toString
-