ContentType Class

public final class ContentType
extends ExpandableStringEnum<ContentType>

content type.

Field Summary

Modifier and Type Field and Description
static final ContentType APPLICATION_JSON

The content type is application/json.

Constructor Summary

Constructor Description
ContentType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ContentType value.

Method Summary

Modifier and Type Method and Description
static ContentType fromString(String name)

Creates or finds a ContentType from its string representation.

static Collection<ContentType> values()

Gets known ContentType values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

APPLICATION_JSON

public static final ContentType APPLICATION_JSON

The content type is application/json.

Constructor Details

ContentType

@Deprecated
public ContentType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ContentType value.

Method Details

fromString

public static ContentType fromString(String name)

Creates or finds a ContentType from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding ContentType.

values

public static Collection<ContentType> values()

Gets known ContentType values.

Returns:

known ContentType values.

Applies to