public.javadoc.org.spincast.core.utils.ContentTypeDefaults.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
ContentTypeDefaults (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.utils
Enum ContentTypeDefaults
- java.lang.Object
-
- java.lang.Enum<ContentTypeDefaults>
-
- org.spincast.core.utils.ContentTypeDefaults
-
- All Implemented Interfaces:
- Serializable, Comparable<ContentTypeDefaults>
public enum ContentTypeDefaults
extends Enum<ContentTypeDefaults>
Some often used Content-Types
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
static ContentTypeDefaults
fromString(String contentTypeString)
static Set<String>
getAllContentTypesVariations()
String
getMainVariation()
String
getMainVariationWithUtf8Charset()
Set<String>
getVariations()
static ContentTypeDefaults
valueOf(String name)
Returns the enum constant of this type with the specified name.
static ContentTypeDefaults[]
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
-
-
Enum Constant Detail
-
TEXT
public static final ContentTypeDefaults TEXT
-
JSON
public static final ContentTypeDefaults JSON
-
XML
public static final ContentTypeDefaults XML
-
HTML
public static final ContentTypeDefaults HTML
-
BINARY
public static final ContentTypeDefaults BINARY
-
Method Detail
-
values
public static ContentTypeDefaults[] 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 (ContentTypeDefaults c : ContentTypeDefaults.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentTypeDefaults 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
-
getMainVariation
public String getMainVariation()
-
getMainVariationWithUtf8Charset
public String getMainVariationWithUtf8Charset()
-
fromString
public static ContentTypeDefaults fromString(String contentTypeString)
Copyright © 2019. All rights reserved.