public enum XContentType extends Enum<XContentType>
XContent
.Enum Constant and Description |
---|
CBOR
A CBOR based content type.
|
JSON
A JSON based content type.
|
SMILE
The jackson based smile binary format.
|
YAML
A YAML based content type.
|
Modifier and Type | Method and Description |
---|---|
static XContentType |
fromRestContentType(String contentType) |
int |
index() |
abstract String |
restContentType() |
abstract String |
shortName() |
static XContentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
abstract XContent |
xContent() |
public static final XContentType JSON
public static final XContentType SMILE
public static final XContentType YAML
public static final XContentType CBOR
public static XContentType[] values()
for (XContentType c : XContentType.values()) System.out.println(c);
public static XContentType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static XContentType fromRestContentType(String contentType)
public int index()
public abstract String restContentType()
public abstract String shortName()
public abstract XContent xContent()
Copyright © 2009–2015. All rights reserved.