|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.arcao.geocaching.api.impl.live_geocaching_api.parser.JsonReader
public class JsonReader
| Constructor Summary | |
|---|---|
JsonReader(Reader in)
|
|
| Method Summary | |
|---|---|
void |
beginArray()
Consumes the next token from the JSON stream and asserts that it is the beginning of a new array. |
void |
beginObject()
Consumes the next token from the JSON stream and asserts that it is the beginning of a new object. |
void |
close()
Closes this JSON reader and the underlying Reader. |
void |
endArray()
Consumes the next token from the JSON stream and asserts that it is the end of the current array. |
void |
endObject()
Consumes the next token from the JSON stream and asserts that it is the end of the current array. |
boolean |
hasNext()
Returns true if the current array or object has another element. |
boolean |
isLenient()
Returns true if this parser is liberal in what it accepts. |
boolean |
nextBoolean()
Returns the boolean value of the next token,
consuming it. |
boolean |
nextBoolean(boolean defaultValue)
|
double |
nextDouble()
Returns the double value of the next token,
consuming it. |
double |
nextDouble(double defaultValue)
|
int |
nextInt()
Returns the int value of the next token,
consuming it. |
int |
nextInt(int defaultValue)
|
long |
nextLong()
Returns the long value of the next token,
consuming it. |
long |
nextLong(long defaultValue)
|
String |
nextName()
Returns the next token, a property name, and
consumes it. |
void |
nextNull()
Consumes the next token from the JSON stream and asserts that it is a literal null. |
String |
nextString()
Returns the string value of the next token,
consuming it. |
String |
nextString(String defaultValue)
|
com.google.gson.stream.JsonToken |
peek()
Returns the type of the next token without consuming it. |
void |
setLenient(boolean lenient)
Configure this parser to be be liberal in what it accepts. |
void |
skipValue()
Skips the next value recursively. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JsonReader(Reader in)
| Method Detail |
|---|
public void setLenient(boolean lenient)
")]}'\n".
NaNs or infinities.
// or # and
ending with a newline character.
/* and ending with
*/. Such comments may not be nested.
'single quoted'.
'single quoted'.
; instead of ,.
= or => instead of
:.
; instead of ,.
public boolean isLenient()
public void beginArray()
throws IOException
IOException
public void endArray()
throws IOException
IOException
public void beginObject()
throws IOException
IOException
public void endObject()
throws IOException
IOException
public boolean hasNext()
throws IOException
IOException
public com.google.gson.stream.JsonToken peek()
throws IOException
IOException
public String nextName()
throws IOException
property name, and
consumes it.
IOException - if the next token in the stream is not a property
name.
public String nextString()
throws IOException
string value of the next token,
consuming it. If the next token is a number, this method will return its
string form.
IllegalStateException - if the next token is not a string or if
this reader is closed.
IOException
public String nextString(String defaultValue)
throws IOException
IOException
public boolean nextBoolean()
throws IOException
boolean value of the next token,
consuming it.
IllegalStateException - if the next token is not a boolean or if
this reader is closed.
IOException
public boolean nextBoolean(boolean defaultValue)
throws IOException
IOException
public void nextNull()
throws IOException
IllegalStateException - if the next token is not null or if this
reader is closed.
IOException
public double nextDouble()
throws IOException
double value of the next token,
consuming it. If the next token is a string, this method will attempt to
parse it as a double.
IllegalStateException - if the next token is not a literal value.
NumberFormatException - if the next literal value cannot be parsed
as a double, or is non-finite.
IOException
public double nextDouble(double defaultValue)
throws IOException
IOException
public long nextLong()
throws IOException
long value of the next token,
consuming it. If the next token is a string, this method will attempt to
parse it as a long. If the next token's numeric value cannot be exactly
represented by a Java long, this method throws.
IllegalStateException - if the next token is not a literal value.
NumberFormatException - if the next literal value cannot be parsed
as a number, or exactly represented as a long.
IOException
public long nextLong(long defaultValue)
throws IOException
IOException
public int nextInt()
throws IOException
int value of the next token,
consuming it. If the next token is a string, this method will attempt to
parse it as an int. If the next token's numeric value cannot be exactly
represented by a Java int, this method throws.
IllegalStateException - if the next token is not a literal value.
NumberFormatException - if the next literal value cannot be parsed
as a number, or exactly represented as an int.
IOException
public int nextInt(int defaultValue)
throws IOException
IOException
public void close()
throws IOException
Reader.
IOException
public void skipValue()
throws IOException
IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||