@NotThreadSafe public static class JsonReader.Tokenizer extends Object
| Constructor and Description |
|---|
JsonReader.Tokenizer(Reader reader)
Create a new tokenizer that uses the supplied
Java IO Reader instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
columnNumber() |
protected String |
complete(StringBuilder sb) |
ParsingException |
error(String message) |
ParsingException |
error(String message,
Throwable t) |
boolean |
isFinished() |
int |
lineNumber() |
protected char |
next() |
String |
next(int characterCount) |
boolean |
nextDocumentDelim()
Consume the next document delimiter (either a ',' or a ';'), and return whether the end-of-document character (e.g.,
'}') has been consumed.
|
void |
nextFieldDelim() |
String |
nextNumber()
Return a string containing the next number on the stream.
|
String |
nextString()
Read the next quoted string from the stream, where stream begins with the a single-quote or double-quote character and
the string ends with the same quote character.
|
String |
nextString(char endQuote) |
char |
nextUsefulChar() |
String |
nextWord()
Return a string containing the next alpha-numeric word on the stream.
|
char |
peek() |
protected StringBuilder |
stringBuilder() |
public JsonReader.Tokenizer(Reader reader)
Java IO Reader instance.reader - the reader for accessing the JSON content; may not be nullpublic boolean isFinished()
protected char next()
throws ParsingException
ParsingExceptionpublic String next(int characterCount) throws ParsingException
ParsingExceptionprotected final StringBuilder stringBuilder()
protected final String complete(StringBuilder sb)
public char nextUsefulChar()
throws ParsingException
ParsingExceptionpublic char peek()
throws ParsingException
ParsingExceptionpublic String nextString() throws ParsingException
ParsingExceptionpublic String nextString(char endQuote) throws ParsingException
ParsingExceptionpublic void nextFieldDelim()
throws ParsingException
ParsingExceptionpublic boolean nextDocumentDelim()
throws ParsingException
ParsingException - if the document delimiter could not be readpublic String nextNumber() throws ParsingException
ParsingException - if the number could not be readpublic String nextWord() throws ParsingException
ParsingException - if the number could not be readpublic ParsingException error(String message)
public ParsingException error(String message, Throwable t)
public int lineNumber()
public int columnNumber()
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.