- All Implemented Interfaces:
Serializable,Comparable<HttpStatus>,Constable
Http status codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpStatusfromCode(int code) Returns the HttpStatus that corresponds to the given code.intgetCode()Returns the HTTP status code.Returns the HTTP status message.toString()static HttpStatusReturns the enum constant of this class with the specified name.static HttpStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONTINUE
-
SWITCHING_PROTOCOLS
-
PROCESSING
-
EARLY_HINTS
-
OK
-
CREATED
-
ACCEPTED
-
NON_AUTHORITATIVE_INFORMATION
-
NO_CONTENT
-
RESET_CONTENT
-
PARTIAL_CONTENT
-
MULTI_STATUS
-
ALREADY_REPORTED
-
IM_USED
-
MULTIPLE_CHOICES
-
MOVED_PERMANENTLY
-
FOUND
-
SEE_OTHER
-
NOT_MODIFIED
-
USE_PROXY
-
TEMPORARY_REDIRECT
-
PERMANENT_REDIRECT
-
BAD_REQUEST
-
UNAUTHORIZED
-
PAYMENT_REQUIRED
-
FORBIDDEN
-
NOT_FOUND
-
METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
-
CONFLICT
-
GONE
-
LENGTH_REQUIRED
-
PRECONDITION_FAILED
-
CONTENT_TOO_LARGE
-
URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
-
RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
-
IM_A_TEAPOT
-
ENHANCE_YOUR_CALM
-
MISDIRECTED_REQUEST
-
UNPROCESSABLE_CONTENT
-
LOCKED
-
FAILED_DEPENDENCY
-
TOO_EARLY
-
UPGRADE_REQUIRED
-
PRECONDITION_REQUIRED
-
TOO_MANY_REQUESTS
-
REQUEST_HEADER_FIELDS_TOO_LARGE
-
UNAVAILABLE_FOR_LEGAL_REASONS
-
INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
-
BAD_GATEWAY
-
SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
-
INSUFFICIENT_STORAGE
-
LOOP_DETECTED
-
NETWORK_AUTHENTICATION_REQUIRED
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()Returns the HTTP status code.- Returns:
- the HTTP status code number.
-
getMessage
Returns the HTTP status message.- Returns:
- the HTTP status message.
-
fromCode
Returns the HttpStatus that corresponds to the given code.- Parameters:
code- the HTTP status code.- Returns:
- the HttpStatus instance that corresponds to the given code,
UNKNOWNotherwise.
-
toString
- Overrides:
toStringin classEnum<HttpStatus>
-