com.google.api.client.json.gson
Class GsonParser

java.lang.Object
  extended by com.google.api.client.json.JsonParser
      extended by com.google.api.client.json.gson.GsonParser

Deprecated. (scheduled to be made package-private in 1.6)

@Deprecated
public class GsonParser
extends JsonParser

Low-level JSON serializer implementation based on GSON.

Implementation is not thread-safe.

Since:
1.3
Author:
Yaniv Inbar

Method Summary
 void close()
          Deprecated. Closes the parser and the underlying input stream or reader, and releases any memory associated with it.
 BigInteger getBigIntegerValue()
          Deprecated. Returns the BigInteger value of the current token.
 byte getByteValue()
          Deprecated. Returns the byte value of the current token.
 String getCurrentName()
          Deprecated. Returns the most recent field name or null for array values or for root-level values.
 JsonToken getCurrentToken()
          Deprecated. Returns the token the parser currently points to or null for none (at start of input or after end of input).
 BigDecimal getDecimalValue()
          Deprecated. Returns the BigDecimal value of the current token.
 double getDoubleValue()
          Deprecated. Returns the double value of the current token.
 JsonFactory getFactory()
          Deprecated. Returns the JSON factory from which this generator was created.
 float getFloatValue()
          Deprecated. Returns the float value of the current token.
 int getIntValue()
          Deprecated. Returns the int value of the current token.
 long getLongValue()
          Deprecated. Returns the long value of the current token.
 short getShortValue()
          Deprecated. Returns the short value of the current token.
 String getText()
          Deprecated. Returns a textual representation of the current token or null if JsonParser.getCurrentToken() is null.
 JsonToken nextToken()
          Deprecated. Returns the next token from the stream or null to indicate end of input.
 JsonParser skipChildren()
          Deprecated. Skips to the matching JsonToken.END_ARRAY if current token is JsonToken.START_ARRAY, the matching JsonToken.END_OBJECT if the current token is JsonToken.START_OBJECT, else does nothing.
 
Methods inherited from class com.google.api.client.json.JsonParser
parse, parse, parseAndClose, parseAndClose, parseArray, parseArray, parseArrayAndClose, parseArrayAndClose, skipToKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()
           throws IOException
Deprecated. 
Description copied from class: JsonParser
Closes the parser and the underlying input stream or reader, and releases any memory associated with it.

Specified by:
close in class JsonParser
Throws:
IOException - if failed

getCurrentName

public String getCurrentName()
Deprecated. 
Description copied from class: JsonParser
Returns the most recent field name or null for array values or for root-level values.

Specified by:
getCurrentName in class JsonParser

getCurrentToken

public JsonToken getCurrentToken()
Deprecated. 
Description copied from class: JsonParser
Returns the token the parser currently points to or null for none (at start of input or after end of input).

Specified by:
getCurrentToken in class JsonParser

getFactory

public JsonFactory getFactory()
Deprecated. 
Description copied from class: JsonParser
Returns the JSON factory from which this generator was created.

Specified by:
getFactory in class JsonParser

getByteValue

public byte getByteValue()
Deprecated. 
Description copied from class: JsonParser
Returns the byte value of the current token.

Specified by:
getByteValue in class JsonParser

getShortValue

public short getShortValue()
Deprecated. 
Description copied from class: JsonParser
Returns the short value of the current token.

Specified by:
getShortValue in class JsonParser

getIntValue

public int getIntValue()
Deprecated. 
Description copied from class: JsonParser
Returns the int value of the current token.

Specified by:
getIntValue in class JsonParser

getFloatValue

public float getFloatValue()
Deprecated. 
Description copied from class: JsonParser
Returns the float value of the current token.

Specified by:
getFloatValue in class JsonParser

getBigIntegerValue

public BigInteger getBigIntegerValue()
Deprecated. 
Description copied from class: JsonParser
Returns the BigInteger value of the current token.

Specified by:
getBigIntegerValue in class JsonParser

getDecimalValue

public BigDecimal getDecimalValue()
Deprecated. 
Description copied from class: JsonParser
Returns the BigDecimal value of the current token.

Specified by:
getDecimalValue in class JsonParser

getDoubleValue

public double getDoubleValue()
Deprecated. 
Description copied from class: JsonParser
Returns the double value of the current token.

Specified by:
getDoubleValue in class JsonParser

getLongValue

public long getLongValue()
Deprecated. 
Description copied from class: JsonParser
Returns the long value of the current token.

Specified by:
getLongValue in class JsonParser

getText

public String getText()
Deprecated. 
Description copied from class: JsonParser
Returns a textual representation of the current token or null if JsonParser.getCurrentToken() is null.

Specified by:
getText in class JsonParser

nextToken

public JsonToken nextToken()
                    throws IOException
Deprecated. 
Description copied from class: JsonParser
Returns the next token from the stream or null to indicate end of input.

Specified by:
nextToken in class JsonParser
Throws:
IOException

skipChildren

public JsonParser skipChildren()
                        throws IOException
Deprecated. 
Description copied from class: JsonParser
Skips to the matching JsonToken.END_ARRAY if current token is JsonToken.START_ARRAY, the matching JsonToken.END_OBJECT if the current token is JsonToken.START_OBJECT, else does nothing.

Specified by:
skipChildren in class JsonParser
Throws:
IOException


Copyright © 2011 Google. All Rights Reserved.