public interface JsopReader
Modifier and Type | Field and Description |
---|---|
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".
|
Modifier and Type | Method and Description |
---|---|
@Nullable java.lang.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.
|
java.lang.String |
read(int type)
Read a token which must match a given token type.
|
@Nullable java.lang.String |
readRawValue()
Return the row (escaped) token.
|
@Nullable java.lang.String |
readString()
Read a string.
|
void |
resetReader()
Reset the position to 0, so that to restart reading.
|
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
java.lang.String read(int type)
type
- the token typejava.lang.IllegalStateException
- if the token type doesn't match@Nullable @Nullable java.lang.String readString()
java.lang.IllegalStateException
- if the token type doesn't matchint read()
boolean matches(int type)
type
- the token type@Nullable @Nullable java.lang.String readRawValue()
@Nullable @Nullable java.lang.String getToken()
int getTokenType()
void resetReader()
Copyright © 2010 - 2020 Adobe. All Rights Reserved