|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.internal.authentication.Parser
public class Parser
A simple parser that is mainly used to parse HTTP header fields.
Field Summary | |
---|---|
int |
pos
The index of the next character in s to be parsed. |
String |
s
The string being parsed. |
Constructor Summary | |
---|---|
Parser(String s)
Creates a new parser on the given string. |
Method Summary | |
---|---|
void |
checkPosition()
Throws a ParserException if pos is out of
range. |
void |
match(char c)
Skips the next character in s if it matches c, otherwise a ParserException is thrown. |
String |
nextQuotedString()
Returns the next quoted string is s (quotes included). |
String |
nextToken()
Returns the next token in s. |
void |
skipWhiteSpace()
Skips the next sequence of white space in s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String s
public int pos
Constructor Detail |
---|
public Parser(String s)
s
- the string to be parsedMethod Detail |
---|
public void checkPosition() throws ParserException
ParserException
if pos
is out of
range.
ParserException
public void match(char c) throws ParserException
ParserException
is thrown.
c
-
ParserException
public String nextQuotedString() throws ParserException
ParserException
if the next substring in s is not a
quoted string.
ParserException
public String nextToken() throws ParserException
ParserException
if
the next substring in s is not a token.
ParserException
public void skipWhiteSpace()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |