@NotThreadSafe public static class JsonReader.Tokenizer extends Object
Constructor and Description |
---|
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 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
ParsingException
public String next(int characterCount) throws ParsingException
ParsingException
protected final StringBuilder stringBuilder()
protected final String complete(StringBuilder sb)
public char nextUsefulChar() throws ParsingException
ParsingException
public char peek() throws ParsingException
ParsingException
public String nextString() throws ParsingException
ParsingException
public String nextString(char endQuote) throws ParsingException
ParsingException
public void nextFieldDelim() throws ParsingException
ParsingException
public 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–2016 JBoss, a division of Red Hat. All rights reserved.