public enum ContentType extends java.lang.Enum<ContentType>
| 枚举常量和说明 |
|---|
FORM_URLENCODED
query类型
|
JSON
json类型
|
MULTIPART
表单类型
|
XML
xml类型
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ContentType |
get(java.lang.String body) |
static boolean |
isDefault(java.lang.String contentType) |
static boolean |
isFormUrlEncoed(java.lang.String contentType) |
java.lang.String |
toString() |
static ContentType |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static ContentType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ContentType FORM_URLENCODED
public static final ContentType MULTIPART
public static final ContentType JSON
public static final ContentType XML
public static ContentType[] values()
for (ContentType c : ContentType.values()) System.out.println(c);
public static ContentType valueOf(java.lang.String name)
name - 要返回的枚举常量的名称。java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException - 如果参数为空值public java.lang.String toString()
toString 在类中 java.lang.Enum<ContentType>public static boolean isDefault(java.lang.String contentType)
public static boolean isFormUrlEncoed(java.lang.String contentType)
public static ContentType get(java.lang.String body)
Copyright © 2020. All Rights Reserved.