public enum ContentTypes extends java.lang.Enum<ContentTypes> implements java.lang.Iterable<java.lang.String>
Collection of Content-Type header values grouped together by their overall type. Generally the first element in the list is the most common content type value for the type.
Enum Constant and Description |
---|
ANY |
BINARY |
HTML |
JSON |
MULTIPART_FORMDATA |
MULTIPART_MIXED |
TEXT |
URLENC |
XML |
Modifier and Type | Method and Description |
---|---|
void |
forEach(java.util.function.Consumer<? super java.lang.String> action) |
static ContentTypes |
fromValue(java.lang.String value) |
java.lang.String |
getAt(int index) |
java.util.Iterator<java.lang.String> |
iterator() |
java.util.Spliterator<java.lang.String> |
spliterator() |
static ContentTypes |
valueOf(java.lang.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 ANY
public static final ContentTypes TEXT
public static final ContentTypes JSON
public static final ContentTypes XML
public static final ContentTypes HTML
public static final ContentTypes URLENC
public static final ContentTypes BINARY
public static final ContentTypes MULTIPART_FORMDATA
public static final ContentTypes MULTIPART_MIXED
public static ContentTypes[] values()
for (ContentTypes c : ContentTypes.values()) System.out.println(c);
public static ContentTypes 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 ContentTypes fromValue(java.lang.String value)
public java.lang.String getAt(int index)
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public void forEach(java.util.function.Consumer<? super java.lang.String> action)
forEach
in interface java.lang.Iterable<java.lang.String>
public java.util.Spliterator<java.lang.String> spliterator()
spliterator
in interface java.lang.Iterable<java.lang.String>