com.google.api.client.json
Enum JsonEncoding
java.lang.Object
java.lang.Enum<JsonEncoding>
com.google.api.client.json.JsonEncoding
- All Implemented Interfaces:
- Serializable, Comparable<JsonEncoding>
public enum JsonEncoding
- extends Enum<JsonEncoding>
Enumeration that defines legal encodings that can be used for JSON content, based on list of
allowed encodings from JSON specification.
Limitation: currently only UTF-8 encoding is supported.
- Since:
- 1.3
- Author:
- Yaniv Inbar
Enum Constant Summary |
UTF8
|
Method Summary |
static JsonEncoding |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static JsonEncoding[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
UTF8
public static final JsonEncoding UTF8
values
public static JsonEncoding[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (JsonEncoding c : JsonEncoding.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static JsonEncoding valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
Copyright © 2011-2012 Google. All Rights Reserved.