public enum ContentTypes extends Enum<ContentTypes>
Enum Constant and Description |
---|
JSON
content type JSON
|
MULTIPART_FORMDATA
content type MULTIPART_FORMDATA
|
OCTECT_STREAM |
PDF
content type PDF
|
TEXT
content type TEXT
|
TEXT_PLAIN
content type TEXT_PLAIN
|
XML
content type XML
|
Modifier and Type | Method and Description |
---|---|
static String |
getContentType(String format)
Method to retrieve the corresponding content type for the given format
|
String |
toString()
Method to get the string value of content type
|
static ContentTypes |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContentTypes[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentTypes XML
public static final ContentTypes JSON
public static final ContentTypes TEXT
public static final ContentTypes TEXT_PLAIN
public static final ContentTypes MULTIPART_FORMDATA
public static final ContentTypes OCTECT_STREAM
public static final ContentTypes PDF
public static ContentTypes[] values()
for (ContentTypes c : ContentTypes.values()) System.out.println(c);
public static ContentTypes 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 String toString()
toString
in class Enum<ContentTypes>
Copyright © 2021. All Rights Reserved.