Enum Class HttpStatus.Code
- All Implemented Interfaces:
 Serializable, Comparable<HttpStatus.Code>, Constable
- Enclosing class:
 HttpStatus
- 
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> - 
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(int code) intgetCode()booleanTests whether the status code is of theClient Errormessage category as defined in RFC 9110.booleanTests whether the status code is of theInformationalmessage category as defined in RFC 9110.booleanTests whether the status code is of theRedirectionmessage category as defined in RFC 9110.booleanTests whether the status code is of theServer Errormessage category as defined in RFC 9110.booleanTests whether the status code is of theSuccessfulmessage category as defined in RFC 9110.toString()static HttpStatus.CodeReturns the enum constant of this class with the specified name.static HttpStatus.Code[]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_HINT
Deprecated, for removal: This API element is subject to removal in a future version. - 
EARLY_HINTS
 - 
OK
 - 
CREATED
 - 
ACCEPTED
 - 
NON_AUTHORITATIVE_INFORMATION
 - 
NO_CONTENT
 - 
RESET_CONTENT
 - 
PARTIAL_CONTENT
 - 
MULTI_STATUS
 - 
MULTIPLE_CHOICES
 - 
MOVED_PERMANENTLY
 - 
MOVED_TEMPORARILY
 - 
FOUND
 - 
SEE_OTHER
 - 
NOT_MODIFIED
 - 
USE_PROXY
 - 
TEMPORARY_REDIRECT
 - 
PERMANET_REDIRECT
Deprecated, for removal: This API element is subject to removal in a future version. - 
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
 - 
PAYLOAD_TOO_LARGE
 - 
URI_TOO_LONG
 - 
UNSUPPORTED_MEDIA_TYPE
 - 
RANGE_NOT_SATISFIABLE
 - 
EXPECTATION_FAILED
 - 
IM_A_TEAPOT
 - 
ENHANCE_YOUR_CALM
 - 
MISDIRECTED_REQUEST
 - 
UNPROCESSABLE_ENTITY
 - 
LOCKED
 - 
FAILED_DEPENDENCY
 - 
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
 - 
NOT_EXTENDED
 - 
NETWORK_AUTHENTICATION_REQUIRED
 
 - 
 - 
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() - 
getMessage
 - 
equals
public boolean equals(int code)  - 
toString
- Overrides:
 toStringin classEnum<HttpStatus.Code>
 - 
isInformational
public boolean isInformational()Tests whether the status code is of theInformationalmessage category as defined in RFC 9110.- Returns:
 - true if within range of codes that belongs to
Informationalcodes. 
 - 
isSuccess
public boolean isSuccess()Tests whether the status code is of theSuccessfulmessage category as defined in RFC 9110.- Returns:
 - true if within range of codes that belongs to
Successfulcodes. 
 - 
isRedirection
public boolean isRedirection()Tests whether the status code is of theRedirectionmessage category as defined in RFC 9110.- Returns:
 - true if within range of codes that belongs to
Redirectioncodes. 
 - 
isClientError
public boolean isClientError()Tests whether the status code is of theClient Errormessage category as defined in RFC 9110.- Returns:
 - true if within range of codes that belongs to
Client Errorcodes. 
 - 
isServerError
public boolean isServerError()Tests whether the status code is of theServer Errormessage category as defined in RFC 9110.- Returns:
 - true if within range of codes that belongs to
Server Errorcodes. 
 
 -