org.apache.commons.httpclient
public class StatusLine extends 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.
Since: 2.0
Version: $Id: StatusLine.java 480424 2006-11-29 05:56:49Z bayard $
See Also: HttpStatus
| Constructor Summary | |
|---|---|
| StatusLine(String statusLine)
Default constructor.
| |
| Method Summary | |
|---|---|
| String | getHttpVersion() |
| String | getReasonPhrase() |
| int | getStatusCode() |
| static boolean | startsWithHTTP(String s)
Tests if the string starts with 'HTTP' signature. |
| String | toString()
Return a string representation of this object. |
Parameters: statusLine the status line returned from the HTTP server
Throws: HttpException if the status line is invalid
Returns: the HTTP-Version
Returns: the Reason-Phrase
Returns: the Status-Code
Parameters: s string to test
Returns: true if the line starts with 'HTTP' signature, false otherwise.
Returns: a string represenation of this object.