|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.http.HttpParser.ParsedState
public static final class HttpParser.ParsedState
A state holder for the parser.
| Constructor Summary | |
|---|---|
HttpParser.ParsedState()
Constructs a new parsed state. |
|
HttpParser.ParsedState(int start)
Constructs a new parsed state with a start. |
|
HttpParser.ParsedState(int start,
int bend)
Constructs a new parsed state with a start and a buffer end. |
|
| Method Summary | |
|---|---|
void |
addSeparator(char sep)
Adds an alternate separator. |
void |
clear()
Clears the state. |
void |
clear(int start)
Clears the state with a start. |
void |
clear(int start,
int bend)
Clears the state with a start and a buffer end. |
boolean |
hasNext()
Checks whether non-parsed items still exists. |
int |
length()
Returns the length of the buffer to be parsed. |
void |
nested(HttpParser.ParsedState ps)
Starts a nested parsed state. |
void |
next()
Starts to parse the next item. |
int |
nextItem(char[] raw)
Parses a list of items, taking care of quotes and optional WS. |
void |
setQuotable(boolean flag)
Sets whether quated items are parsed separately. |
void |
setSeparator(char sep)
Sets the separator. |
void |
setSkipable(boolean flag)
Sets whether leading and trailing spaces are skipped. |
String |
toString(char[] raw)
Converts the parsed state into a string. |
String |
toString(char[] raw,
boolean item)
Converts the parsed item into a string. |
String |
toString(char[] raw,
boolean item,
boolean lower)
Converts the parsed item into a upper/lower case string. |
boolean |
unquote(char[] raw)
Removes quota. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpParser.ParsedState()
public HttpParser.ParsedState(int start)
start - a start offset
public HttpParser.ParsedState(int start,
int bend)
start - a start offset.bend - a buffer end.| Method Detail |
|---|
public final void setSeparator(char sep)
sep - the separator.public final void addSeparator(char sep)
Note that the current implementation supports only one additional separator.
sep - the separator.public final void setQuotable(boolean flag)
flag - true if quotable, otherwise false.public final void setSkipable(boolean flag)
flag - true if skipped, otherwise false.public final boolean hasNext()
public final int length()
public final void clear()
public final void clear(int start)
start - the new start.
public final void clear(int start,
int bend)
start - the new start.bend - the new end.public final void next()
public final void nested(HttpParser.ParsedState ps)
ps - the upper level statepublic final boolean unquote(char[] raw)
raw - the buffer.
public final int nextItem(char[] raw)
raw - the buffer.
public final String toString(char[] raw)
raw - the buffer.
public final String toString(char[] raw,
boolean item)
raw - the buffer.item - the item flag.
public final String toString(char[] raw,
boolean item,
boolean lower)
raw - the buffer.item - the item flag.lower - the case setting.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||