|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JsopReader
A reader for Json and Jsop strings.
| Field Summary | |
|---|---|
static int |
COMMENT
The token type of a comment, if supported by the reader. |
static int |
END
The token type that signals the end of the stream. |
static int |
ERROR
The token type of a parse error. |
static int |
FALSE
The token type of the value "false". |
static int |
IDENTIFIER
The token type of an identifier (an unquoted string), if supported by the reader. |
static int |
NULL
The token type of "null". |
static int |
NUMBER
The token type of a number value. |
static int |
STRING
The token type of a string value. |
static int |
TRUE
The token type of the value "true". |
| Method Summary | |
|---|---|
String |
getToken()
Get the last token value if the the token type was STRING or NUMBER. |
int |
getTokenType()
Get the token type of the last token. |
boolean |
matches(int type)
Read a token which must match a given token type. |
int |
read()
Read a token and return the token type. |
String |
read(int type)
Read a token which must match a given token type. |
String |
readRawValue()
Return the row (escaped) token. |
String |
readString()
Read a string. |
void |
resetReader()
Reset the position to 0, so that to restart reading. |
| Field Detail |
|---|
static final int END
static final int STRING
static final int NUMBER
static final int TRUE
static final int FALSE
static final int NULL
static final int ERROR
static final int IDENTIFIER
static final int COMMENT
| Method Detail |
|---|
String read(int type)
type - the token type
IllegalStateException - if the token type doesn't match@CheckForNull String readString()
IllegalStateException - if the token type doesn't matchint read()
boolean matches(int type)
type - the token type
@CheckForNull String readRawValue()
@CheckForNull String getToken()
int getTokenType()
void resetReader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||