org.apache.commons.httpclient
public class StatusLine extends java.lang.Object
6.1 Status-Line
The first line of a Response message is the Status-Line, consisting
of the protocol version followed by a numeric status code and its
associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
This class is immutable and is inherently thread safe.
HttpStatus| Constructor and Description |
|---|
StatusLine(java.lang.String statusLine)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHttpVersion() |
java.lang.String |
getReasonPhrase() |
int |
getStatusCode() |
static boolean |
startsWithHTTP(java.lang.String s)
Tests if the string starts with 'HTTP' signature.
|
java.lang.String |
toString()
Return a string representation of this object.
|
public StatusLine(java.lang.String statusLine)
throws HttpException
statusLine - the status line returned from the HTTP serverHttpException - if the status line is invalidpublic final int getStatusCode()
public final java.lang.String getHttpVersion()
public final java.lang.String getReasonPhrase()
public final java.lang.String toString()
toString in class java.lang.Objectpublic static boolean startsWithHTTP(java.lang.String s)
s - string to test