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.
HttpStatus
Constructor and Description |
---|
StatusLine(String statusLine)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public StatusLine(String statusLine) throws HttpException
statusLine
- the status line returned from the HTTP serverHttpException
- if the status line is invalidpublic final int getStatusCode()
public final String getHttpVersion()
public final String getReasonPhrase()
public final String toString()
public static boolean startsWithHTTP(String s)
s
- string to testCopyright © 2010 - 2020 Adobe. All Rights Reserved