public static enum HttpStatus.Code extends Enum<HttpStatus.Code>
Modifier and Type | Method and Description |
---|---|
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)
Returns the enum constant of this type with the specified name.
|
static HttpStatus.Code[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
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 PERMANENT_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
- 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 int getCode()
public String getMessage()
public boolean equals(int code)
public String toString()
toString
in class 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 © 2010 - 2020 Adobe. All Rights Reserved