Enum Class HttpStatusCodes
- All Implemented Interfaces:
Serializable,Comparable<HttpStatusCodes>,Constable
HTTP status codes as defined in RFC2616-sec10
and additional status codes as defined in RFC6585
-
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 HttpStatusCodesfromStatusCode(int statusCode) Convert a numerical status code into the corresponding status enum object.getInfo()Get the status code info.intGet the associated status code.toString()Get the status code info.static HttpStatusCodesReturns the enum constant of this class with the specified name.static HttpStatusCodes[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
-
CREATED
-
ACCEPTED
-
NO_CONTENT
-
RESET_CONTENT
-
PARTIAL_CONTENT
-
MOVED_PERMANENTLY
-
FOUND
-
SEE_OTHER
-
NOT_MODIFIED
-
USE_PROXY
-
TEMPORARY_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
-
REQUEST_ENTITY_TOO_LARGE
-
REQUEST_URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
-
REQUESTED_RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
-
MISDIRECTED_REQUEST
-
UNPROCESSABLE_ENTITY
-
LOCKED
-
FAILED_DEPENDENCY
-
PRECONDITION_REQUIRED
-
TOO_MANY_REQUESTS
-
METHOD_FAILED
-
REQUEST_HEADER_FIELD_TOO_LARGE
-
UNAVAILABLE_FOR_LEGAL_REASONS
-
INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
-
BAD_GATEWAY
-
SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
-
-
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
-
fromStatusCode
Convert a numerical status code into the corresponding status enum object.- Parameters:
statusCode- the numerical status code- Returns:
- the matching status enum object or null if no matching enum is defined
-
getStatusCode
public int getStatusCode()Get the associated status code.- Returns:
- the status code.
-
getInfo
Get the status code info.- Returns:
- the status code info
-
toString
Get the status code info.- Overrides:
toStringin classEnum<HttpStatusCodes>- Returns:
- the status code info
-