|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.net.HttpParser
| Constructor Summary | |
HttpParser()
|
|
| Method Summary | |
static void |
parseHeader(String header,
HttpMessage httpMessage)
Parses the specified HTTP header as defined by the
specification. |
static HttpResponse |
parseStatusLine(String statusLine)
Parses the specified HTTP response statusLine as defined
by the specification. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HttpParser()
| Method Detail |
public static void parseHeader(String header,
HttpMessage httpMessage)
throws IllegalArgumentException,
ProtocolException
Parses the specified HTTP header as defined by the
specification. The specification defines the header to be as follows:
message-header = field-name ":" [ field-value ].
As a result of the parsing, the header is added to the specified
httpMessage.
header - the header to be parsed.httpMessage - the HTTP message to which the header is part of.
IllegalArgumentException - if one of the following occurs:
header is
null;
httpMessage is
null.
ProtocolException - if some part of the header could not be parsed properly.
public static HttpResponse parseStatusLine(String statusLine)
throws IllegalArgumentException,
ProtocolException
Parses the specified HTTP response statusLine as defined
by the specification. The specification defines the status line to be as
follows:
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase
(the specified statusLine should not contain the CRLF at the
end.
As a result of the parsing, a HttpResponse object is
returned containing the version, status code and reason phrase.
statusLine - the status line to be parsed.
IllegalArgumentException - if the specified statusLine is
null
ProtocolException - if some part of the status line could not be parsed
properly.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||