|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.data.processing.LexicalTool
things.data.processing.http.ResponseLineParserOLD
public class ResponseLineParserOLD
An HTTP Response Line parser. Uses the same method as the AddressParser.
Version History
EPG - Initial - 12 FEB 07
Field Summary |
---|
Constructor Summary | |
---|---|
ResponseLineParserOLD()
|
Method Summary | |
---|---|
void |
parser(java.io.InputStream ins,
HttpResponse response)
Call with an InputStream. |
void |
parser(StreamSource source,
HttpResponse response)
Parse engine grammar. |
void |
parser(java.lang.String data,
HttpResponse response)
Call with a String. |
Methods inherited from class things.data.processing.LexicalTool |
---|
get822HeadernameType, get822HeadernameTypeWithDollar, get822Type, getClassification, getDNSType, getHexValue, getLower, getName, getUpper, getURIType, getURLFType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResponseLineParserOLD()
Method Detail |
---|
public void parser(StreamSource source, HttpResponse response) throws ThingsException
HTTP/1.1 200 OK Lexical elements: URLCHAR = Letters (A-Z and a-z), numbers (0-9) and the characters '.', '-', '~' and '_', plus we treat # as a character because we don't distinguish is for processing. WS = whitespace not including CR/LF SLASH = forward slash. !OTHER! (meaning anything not listed). Registers Version - response.version Code - response.code Text - response.text HTTP/1.1200 OK... [START] -> [OPEN] -> ^RETURN^ [OPEN] - URLCHAR - push, VERSION, ^RETURN^ - !OTHER! - [DEPLETE], error(must start with a character) - !EOF! - fault(No request present) [VERSION] - URLCHAR - push - SLASH - push - WS - pop->$Version, [CODE], ^RETURN^ - !OTHER! - [DEPLETE], error(expecting code) - !EOF! - fault(Only VERSION present) [CODE] - URLCHAR - push - WS - pop->$Code, [TEXT], ^RETURN^ - !OTHER! - [DEPLETE], error(bad code) - !EOF! - error(No TEXT present) [TEXT] - URLCHAR - push - WS - push - CR - pop->$Text, [DEPLETE], ^RETURN^ - !OTHER! - [DEPLETE], errorbad characters in Text. - !EOF! - error(status line not terminated) [DEPLETE] - CR - [DEPLETE_CR], ^RETURN^ - !OTHER! - burn - !EOF! - error(missing CR at end of line) [DEPLETE_CR] - LF - ^RETURN^ - !EOF! - error(missing LF after CR at end of line: truncated.) - !OTHER! - fault(missing LF after CR at end of line: odd characters found, so stream is unreliable.)
- Parameters:
source
- the stream source.response
- the response object to fill.- Throws:
ThingsException
- If it is a fault, the request should be considered completely invalid. If it is an error, whatever was set in the request might be useful.
public void parser(java.io.InputStream ins, HttpResponse response) throws ThingsException
ins
- the source stream.response
- the response object to fill.
ThingsException
- If it is a fault, the request should be considered completely invalid. If it is an error, whatever was set in the request might be useful.public void parser(java.lang.String data, HttpResponse response) throws ThingsException
data
- the Stringresponse
- the response object to fill.
ThingsException
- If it is a fault, the request should be considered completely invalid. If it is an error, whatever was set in the request might be useful.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |