| java.lang.Object gov.nist.core.ParserCore gov.nist.siplite.parser.Parser gov.nist.siplite.parser.HeaderParser
All known Subclasses: gov.nist.siplite.parser.ContentLengthParser, gov.nist.siplite.parser.ParametersParser, gov.nist.siplite.parser.CSeqParser, gov.nist.siplite.parser.CallIDParser, gov.nist.siplite.parser.ChallengeParser, gov.nist.siplite.parser.ParameterLessParser, gov.nist.siplite.parser.ExpiresParser, gov.nist.siplite.parser.MaxForwardsParser, gov.nist.siplite.parser.DateParser, gov.nist.siplite.parser.ViaParser,
HeaderParser | public class HeaderParser extends Parser (Code) | | Generic header parser class. The parsers for various headers extend this
class. To create a parser for a new header, extend this class and change
the createParser class.
version: JAIN-SIP-1.1 version: This code is in the public domain. |
Method Summary | |
protected Calendar | date() Parses and return a date field. | protected void | headerName(int tok) Parses the header name until the colon and chew WS after that. | public Header | parse() Parses the SIP header from the buffer and return a parsed
structure. | public void | setHeaderToParse(String header) Sets the header to be parsed. | protected void | time(Calendar calendar) Sets the time field. | protected int | wkday() Parses the weekday field. |
HeaderParser | protected HeaderParser()(Code) | | Default constructor.
|
HeaderParser | protected HeaderParser(String header)(Code) | | Creates new HeaderParser.
Parameters: header - String to parse. |
HeaderParser | protected HeaderParser(Lexer lexer)(Code) | | Constructor with initial lexer engine.
Parameters: lexer - initial lexer engine |
headerName | protected void headerName(int tok) throws ParseException(Code) | | Parses the header name until the colon and chew WS after that.
Parameters: tok - the separator token |
parse | public Header parse() throws ParseException(Code) | | Parses the SIP header from the buffer and return a parsed
structure.
the parsed header value throws: ParseException - if there was an error parsing. |
setHeaderToParse | public void setHeaderToParse(String header) throws ParseException(Code) | | Sets the header to be parsed.
Parameters: header - the string to be processed. |
time | protected void time(Calendar calendar) throws ParseException(Code) | | Sets the time field. This has the format hour:minute:second.
Parameters: calendar - input data for setting the time exception: ParseException - if a parsing error occurs |
wkday | protected int wkday() throws ParseException(Code) | | Parses the weekday field.
an integer with the calendar content for wkday. |
|
|