public enum HttpStatusClass extends java.lang.Enum<HttpStatusClass>
枚举常量和说明 |
---|
CLIENT_ERROR
The client error class (4xx)
|
INFORMATIONAL
The informational class (1xx)
|
REDIRECTION
The redirection class (3xx)
|
SERVER_ERROR
The server error class (5xx)
|
SUCCESS
The success class (2xx)
|
UNKNOWN
The unknown class
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
contains(int code)
Returns
true if and only if the specified HTTP status code falls into this class. |
static HttpStatusClass |
valueOf(java.lang.CharSequence code)
Returns the class of the specified HTTP status code.
|
static HttpStatusClass |
valueOf(int code)
Returns the class of the specified HTTP status code.
|
static HttpStatusClass |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static HttpStatusClass[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HttpStatusClass INFORMATIONAL
public static final HttpStatusClass SUCCESS
public static final HttpStatusClass REDIRECTION
public static final HttpStatusClass CLIENT_ERROR
public static final HttpStatusClass SERVER_ERROR
public static final HttpStatusClass UNKNOWN
public static HttpStatusClass[] values()
for (HttpStatusClass c : HttpStatusClass.values()) System.out.println(c);
public static HttpStatusClass valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public static HttpStatusClass valueOf(int code)
public static HttpStatusClass valueOf(java.lang.CharSequence code)
code
- Just the numeric portion of the http status code.public boolean contains(int code)
true
if and only if the specified HTTP status code falls into this class.