public enum XContentType extends java.lang.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 |
fromMediaTypeOrFormat(java.lang.String mediaType) |
int |
index() |
java.lang.String |
mediaType() |
protected abstract java.lang.String |
mediaTypeWithoutParameters() |
static XContentType |
readFrom(StreamInput in) |
abstract java.lang.String |
shortName() |
static XContentType |
valueOf(java.lang.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.
|
static void |
writeTo(XContentType contentType,
StreamOutput out) |
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(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static XContentType fromMediaTypeOrFormat(java.lang.String mediaType)
public int index()
public java.lang.String mediaType()
public abstract java.lang.String shortName()
public abstract XContent xContent()
protected abstract java.lang.String mediaTypeWithoutParameters()
public static XContentType readFrom(StreamInput in) throws java.io.IOException
java.io.IOException
public static void writeTo(XContentType contentType, StreamOutput out) throws java.io.IOException
java.io.IOException