public static enum HttpStatus.Code extends Enum<HttpStatus.Code>
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(int code) |
int |
getCode() |
String |
getMessage() |
boolean |
isClientError()
Simple test against an code to determine if it falls into the
Client Error message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1. |
boolean |
isInformational()
Simple test against an code to determine if it falls into the
Informational message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1. |
boolean |
isRedirection()
Simple test against an code to determine if it falls into the
Redirection message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1. |
boolean |
isServerError()
Simple test against an code to determine if it falls into the
Server Error message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1. |
boolean |
isSuccess()
Simple test against an code to determine if it falls into the
Success message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1. |
String |
toString() |
static HttpStatus.Code |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static HttpStatus.Code[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HttpStatus.Code CONTINUE
public static final HttpStatus.Code SWITCHING_PROTOCOLS
public static final HttpStatus.Code PROCESSING
public static final HttpStatus.Code OK
public static final HttpStatus.Code CREATED
public static final HttpStatus.Code ACCEPTED
public static final HttpStatus.Code NON_AUTHORITATIVE_INFORMATION
public static final HttpStatus.Code NO_CONTENT
public static final HttpStatus.Code RESET_CONTENT
public static final HttpStatus.Code PARTIAL_CONTENT
public static final HttpStatus.Code MULTI_STATUS
public static final HttpStatus.Code MULTIPLE_CHOICES
public static final HttpStatus.Code MOVED_PERMANENTLY
public static final HttpStatus.Code MOVED_TEMPORARILY
public static final HttpStatus.Code FOUND
public static final HttpStatus.Code SEE_OTHER
public static final HttpStatus.Code NOT_MODIFIED
public static final HttpStatus.Code USE_PROXY
public static final HttpStatus.Code TEMPORARY_REDIRECT
public static final HttpStatus.Code PERMANET_REDIRECT
public static final HttpStatus.Code BAD_REQUEST
public static final HttpStatus.Code UNAUTHORIZED
public static final HttpStatus.Code PAYMENT_REQUIRED
public static final HttpStatus.Code FORBIDDEN
public static final HttpStatus.Code NOT_FOUND
public static final HttpStatus.Code METHOD_NOT_ALLOWED
public static final HttpStatus.Code NOT_ACCEPTABLE
public static final HttpStatus.Code PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatus.Code REQUEST_TIMEOUT
public static final HttpStatus.Code CONFLICT
public static final HttpStatus.Code GONE
public static final HttpStatus.Code LENGTH_REQUIRED
public static final HttpStatus.Code PRECONDITION_FAILED
public static final HttpStatus.Code PAYLOAD_TOO_LARGE
public static final HttpStatus.Code URI_TOO_LONG
public static final HttpStatus.Code UNSUPPORTED_MEDIA_TYPE
public static final HttpStatus.Code RANGE_NOT_SATISFIABLE
public static final HttpStatus.Code EXPECTATION_FAILED
public static final HttpStatus.Code IM_A_TEAPOT
public static final HttpStatus.Code ENHANCE_YOUR_CALM
public static final HttpStatus.Code MISDIRECTED_REQUEST
public static final HttpStatus.Code UNPROCESSABLE_ENTITY
public static final HttpStatus.Code LOCKED
public static final HttpStatus.Code FAILED_DEPENDENCY
public static final HttpStatus.Code UPGRADE_REQUIRED
public static final HttpStatus.Code PRECONDITION_REQUIRED
public static final HttpStatus.Code TOO_MANY_REQUESTS
public static final HttpStatus.Code REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpStatus.Code UNAVAILABLE_FOR_LEGAL_REASONS
public static final HttpStatus.Code INTERNAL_SERVER_ERROR
public static final HttpStatus.Code NOT_IMPLEMENTED
public static final HttpStatus.Code BAD_GATEWAY
public static final HttpStatus.Code SERVICE_UNAVAILABLE
public static final HttpStatus.Code GATEWAY_TIMEOUT
public static final HttpStatus.Code HTTP_VERSION_NOT_SUPPORTED
public static final HttpStatus.Code INSUFFICIENT_STORAGE
public static final HttpStatus.Code LOOP_DETECTED
public static final HttpStatus.Code NOT_EXTENDED
public static final HttpStatus.Code NETWORK_AUTHENTICATION_REQUIRED
public static HttpStatus.Code[] values()
for (HttpStatus.Code c : HttpStatus.Code.values()) System.out.println(c);
public static HttpStatus.Code valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getCode()
public String getMessage()
public boolean equals(int code)
public String toString()
toString 在类中 Enum<HttpStatus.Code>public boolean isInformational()
Informational message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1.Informational messages.public boolean isSuccess()
Success message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1.Success messages.public boolean isRedirection()
Redirection message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1.Redirection messages.public boolean isClientError()
Client Error message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1.Client Error messages.public boolean isServerError()
Server Error message category as defined in the
RFC 1945 - HTTP/1.0,
and RFC 7231 -
HTTP/1.1.Server Error messages.Copyright © 2016. All rights reserved.