cn.dreampie.common.http.result
枚举 HttpStatus

java.lang.Object
  继承者 java.lang.Enum<HttpStatus>
      继承者 cn.dreampie.common.http.result.HttpStatus
所有已实现的接口:
Serializable, Comparable<HttpStatus>

public enum HttpStatus
extends Enum<HttpStatus>

Created by ice on 14-12-19.

另请参见:
HTTP/1.1 RFC

嵌套类摘要
static class HttpStatus.Descriptor
           
 
枚举常量摘要
ACCEPTED
          202 Accepted.
BAD_GATEWAY
          502 Bad Gateway.
BAD_REQUEST
          400 Bad Request.
CONFLICT
          409 Conflict.
CONTINUE
          100 Continue.
CREATED
          201 Created.
EXPECTATION_FAILED
          417 Expectation Failed.
FAILED_DEPENDENCY
          424 Failed Dependency.
FORBIDDEN
          403 Forbidden.
FOUND
          302 Found.
GATEWAY_TIMEOUT
          504 Gateway Timeout.
GONE
          410 Gone.
HTTP_VERSION_NOT_SUPPORTED
          505 HTTP Version Not Supported.
I_AM_A_TEAPOT
          418 I'm a teapot.
INTERNAL_SERVER_ERROR
          500 Internal Server Error.
LENGTH_REQUIRED
          411 Length Required.
LOCKED
          423 Locked.
METHOD_NOT_ALLOWED
          405 Method Not Allowed.
MOVED_PERMANENTLY
          301 Moved Permanently.
MULTIPLE_CHOICES
          300 Multiple Choices.
NO_CONTENT
          204 No Content.
NON_AUTHORITATIVE_INFORMATION
          203 Non-Authoritative Information.
NOT_ACCEPTABLE
          406 Not Acceptable.
NOT_FOUND
          404 Not Found.
NOT_IMPLEMENTED
          501 Not Implemented.
NOT_MODIFIED
          304 Not Modified.
OK
          200 OK.
PARTIAL_CONTENT
          206 Partial Content.
PAYMENT_REQUIRED
          402 Payment Required.
PRECONDITION_FAILED
          412 Precondition failed.
PRECONDITION_REQUIRED
          428 Precondition Required.
PROXY_AUTHENTICATION_REQUIRED
          407 Proxy Authentication Required.
REQUEST_ENTITY_TOO_LARGE
          413 Request Entity Too Large.
REQUEST_HEADER_FIELDS_TOO_LARGE
          431 Request Header Fields Too Large.
REQUEST_TIMEOUT
          408 Request Timeout.
REQUEST_URI_TOO_LONG
          414 Request-URI Too Long.
REQUESTED_RANGE_NOT_SATISFIABLE
          416 Requested Range Not Satisfiable.
RESET_CONTENT
          205 Reset Content.
SEE_OTHER
          303 See Other.
SERVICE_UNAVAILABLE
          503 Service Unavailable.
SWITCHING_PROTOCOLS
          101 Switching Protocols.
TEMPORARY_REDIRECT
          307 Temporary Redirect.
TOO_MANY_REQUESTS
          429 Too Many Requests.
UNAUTHORIZED
          401 Unauthorized.
UNPROCESSABLE_ENTITY
          422 Unprocessable Entity.
UNSUPPORTED_MEDIA_TYPE
          415 Unsupported Media Type.
USE_PROXY
          305 Use Proxy.
 
方法摘要
 HttpStatus.Descriptor createDescriptor()
           
 int getCode()
           
 String getDesc()
           
static HttpStatus havingCode(int code)
           
static HttpStatus valueOf(String name)
          返回带有指定名称的该类型的枚举常量。
static HttpStatus[] values()
          按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。
 
从类 java.lang.Enum 继承的方法
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
从类 java.lang.Object 继承的方法
getClass, notify, notifyAll, wait, wait, wait
 

枚举常量详细信息

CONTINUE

public static final HttpStatus CONTINUE
100 Continue.

另请参见:
HTTP/1.1

SWITCHING_PROTOCOLS

public static final HttpStatus SWITCHING_PROTOCOLS
101 Switching Protocols.

另请参见:
HTTP/1.1

OK

public static final HttpStatus OK
200 OK.

另请参见:
HTTP/1.1

CREATED

public static final HttpStatus CREATED
201 Created.

另请参见:
HTTP/1.1

ACCEPTED

public static final HttpStatus ACCEPTED
202 Accepted.

另请参见:
HTTP/1.1

NON_AUTHORITATIVE_INFORMATION

public static final HttpStatus NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information.

另请参见:
HTTP/1.1

NO_CONTENT

public static final HttpStatus NO_CONTENT
204 No Content.

另请参见:
HTTP/1.1

RESET_CONTENT

public static final HttpStatus RESET_CONTENT
205 Reset Content.

另请参见:
HTTP/1.1

PARTIAL_CONTENT

public static final HttpStatus PARTIAL_CONTENT
206 Partial Content.

另请参见:
HTTP/1.1

MULTIPLE_CHOICES

public static final HttpStatus MULTIPLE_CHOICES
300 Multiple Choices.

另请参见:
HTTP/1.1

MOVED_PERMANENTLY

public static final HttpStatus MOVED_PERMANENTLY
301 Moved Permanently.

另请参见:
HTTP/1.1

FOUND

public static final HttpStatus FOUND
302 Found.

另请参见:
HTTP/1.1

SEE_OTHER

public static final HttpStatus SEE_OTHER
303 See Other.

另请参见:
HTTP/1.1

NOT_MODIFIED

public static final HttpStatus NOT_MODIFIED
304 Not Modified.

另请参见:
HTTP/1.1

USE_PROXY

public static final HttpStatus USE_PROXY
305 Use Proxy.

另请参见:
HTTP/1.1

TEMPORARY_REDIRECT

public static final HttpStatus TEMPORARY_REDIRECT
307 Temporary Redirect.

另请参见:
HTTP/1.1

BAD_REQUEST

public static final HttpStatus BAD_REQUEST
400 Bad Request.

另请参见:
HTTP/1.1

UNAUTHORIZED

public static final HttpStatus UNAUTHORIZED
401 Unauthorized.

另请参见:
HTTP/1.1

PAYMENT_REQUIRED

public static final HttpStatus PAYMENT_REQUIRED
402 Payment Required.

另请参见:
HTTP/1.1

FORBIDDEN

public static final HttpStatus FORBIDDEN
403 Forbidden.

另请参见:
HTTP/1.1

NOT_FOUND

public static final HttpStatus NOT_FOUND
404 Not Found.

另请参见:
HTTP/1.1

METHOD_NOT_ALLOWED

public static final HttpStatus METHOD_NOT_ALLOWED
405 Method Not Allowed.

另请参见:
HTTP/1.1

NOT_ACCEPTABLE

public static final HttpStatus NOT_ACCEPTABLE
406 Not Acceptable.

另请参见:
HTTP/1.1

PROXY_AUTHENTICATION_REQUIRED

public static final HttpStatus PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required.

另请参见:
HTTP/1.1

REQUEST_TIMEOUT

public static final HttpStatus REQUEST_TIMEOUT
408 Request Timeout.

另请参见:
HTTP/1.1

CONFLICT

public static final HttpStatus CONFLICT
409 Conflict.

另请参见:
HTTP/1.1

GONE

public static final HttpStatus GONE
410 Gone.

另请参见:
HTTP/1.1

LENGTH_REQUIRED

public static final HttpStatus LENGTH_REQUIRED
411 Length Required.

另请参见:
HTTP/1.1

PRECONDITION_FAILED

public static final HttpStatus PRECONDITION_FAILED
412 Precondition failed.

另请参见:
HTTP/1.1

REQUEST_ENTITY_TOO_LARGE

public static final HttpStatus REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large.

另请参见:
HTTP/1.1

REQUEST_URI_TOO_LONG

public static final HttpStatus REQUEST_URI_TOO_LONG
414 Request-URI Too Long.

另请参见:
HTTP/1.1

UNSUPPORTED_MEDIA_TYPE

public static final HttpStatus UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type.

另请参见:
HTTP/1.1

REQUESTED_RANGE_NOT_SATISFIABLE

public static final HttpStatus REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable.

另请参见:
HTTP/1.1

EXPECTATION_FAILED

public static final HttpStatus EXPECTATION_FAILED
417 Expectation Failed.

另请参见:
HTTP/1.1

I_AM_A_TEAPOT

public static final HttpStatus I_AM_A_TEAPOT
418 I'm a teapot. RFC 2324

另请参见:
HTTP extended

UNPROCESSABLE_ENTITY

public static final HttpStatus UNPROCESSABLE_ENTITY
422 Unprocessable Entity.

另请参见:
WebDAV; RFC 4918

LOCKED

public static final HttpStatus LOCKED
423 Locked.

另请参见:
WebDAV; RFC 4918

FAILED_DEPENDENCY

public static final HttpStatus FAILED_DEPENDENCY
424 Failed Dependency.

另请参见:
WebDAV; RFC 4918

PRECONDITION_REQUIRED

public static final HttpStatus PRECONDITION_REQUIRED
428 Precondition Required.

另请参见:
RFC 6585

TOO_MANY_REQUESTS

public static final HttpStatus TOO_MANY_REQUESTS
429 Too Many Requests.

另请参见:
RFC 6585

REQUEST_HEADER_FIELDS_TOO_LARGE

public static final HttpStatus REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large.

另请参见:
RFC 6585

INTERNAL_SERVER_ERROR

public static final HttpStatus INTERNAL_SERVER_ERROR
500 Internal Server Error.

另请参见:
HTTP/1.1

NOT_IMPLEMENTED

public static final HttpStatus NOT_IMPLEMENTED
501 Not Implemented.

另请参见:
HTTP/1.1

BAD_GATEWAY

public static final HttpStatus BAD_GATEWAY
502 Bad Gateway.

另请参见:
HTTP/1.1

SERVICE_UNAVAILABLE

public static final HttpStatus SERVICE_UNAVAILABLE
503 Service Unavailable.

另请参见:
HTTP/1.1

GATEWAY_TIMEOUT

public static final HttpStatus GATEWAY_TIMEOUT
504 Gateway Timeout.

另请参见:
HTTP/1.1

HTTP_VERSION_NOT_SUPPORTED

public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported.

另请参见:
HTTP/1.1
方法详细信息

values

public static HttpStatus[] values()
按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。该方法可用于迭代 常量,如下所示:
for (HttpStatus c : HttpStatus.values())
    System.out.println(c);


valueOf

public static HttpStatus valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格。)

参数:
name - 要返回的枚举常量的名称。
返回:
返回带有指定名称的枚举常量
抛出:
如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentException

havingCode

public static HttpStatus havingCode(int code)

getCode

public int getCode()

getDesc

public String getDesc()

createDescriptor

public HttpStatus.Descriptor createDescriptor()


Copyright © 2015. All rights reserved.