public enum HttpContentType extends Enum<HttpContentType>
Enum Constant and Description |
---|
IMAGE_GIF |
IMAGE_JPG |
IMAGE_PNG |
IMAGE_SVG |
JSON |
TEXT |
XML |
Modifier and Type | Method and Description |
---|---|
static String |
getHttpContentType(HttpContentType httpContentType)
根据标识获得标准Content-Type类型
|
static HttpContentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpContentType TEXT
public static final HttpContentType JSON
public static final HttpContentType XML
public static final HttpContentType IMAGE_JPG
public static final HttpContentType IMAGE_GIF
public static final HttpContentType IMAGE_PNG
public static final HttpContentType IMAGE_SVG
public static HttpContentType[] values()
for (HttpContentType c : HttpContentType.values()) System.out.println(c);
public static HttpContentType 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 static String getHttpContentType(HttpContentType httpContentType)
httpContentType
- 标记Copyright © 2020 Voovan. All rights reserved.