public enum HttpStatus extends java.lang.Enum<HttpStatus>
| Modifier and Type | Method and Description |
|---|---|
int |
code() |
java.lang.String |
description() |
static boolean |
isClientRange(int code)
Checks if the passed HTTP status code is in the range
of the CLIENT codes (400 ...
|
static boolean |
isOkRange(int code)
Checks if the passed HTTP status code is in the range
of the OK codes (200 ...
|
static boolean |
isRedirectRange(int code)
Checks if the passed HTTP status code is in the range
of the REDIRECT codes (300 ...
|
static boolean |
isServerErrorRange(int code)
Checks if the passed HTTP status code is in the range
of the SERVER ERROR codes (500 ...
|
static HttpStatus |
of(int code)
Returns the HTTP status enum based on an integer value
|
java.lang.String |
toString() |
static HttpStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpStatus HTTP_OK
public static final HttpStatus HTTP_CREATED
public static final HttpStatus HTTP_ACCEPTED
public static final HttpStatus HTTP_NOT_AUTHORITATIVE
public static final HttpStatus HTTP_NO_CONTENT
public static final HttpStatus HTTP_RESET
public static final HttpStatus HTTP_PARTIAL
public static final HttpStatus HTTP_MULT_CHOICE
public static final HttpStatus HTTP_MOVED_PERM
public static final HttpStatus HTTP_MOVED_TEMP
public static final HttpStatus HTTP_SEE_OTHER
public static final HttpStatus HTTP_NOT_MODIFIED
public static final HttpStatus HTTP_USE_PROXY
public static final HttpStatus HTTP_BAD_REQUEST
public static final HttpStatus HTTP_UNAUTHORIZED
public static final HttpStatus HTTP_PAYMENT_REQUIRED
public static final HttpStatus HTTP_FORBIDDEN
public static final HttpStatus HTTP_NOT_FOUND
public static final HttpStatus HTTP_BAD_METHOD
public static final HttpStatus HTTP_NOT_ACCEPTABLE
public static final HttpStatus HTTP_PROXY_AUTH
public static final HttpStatus HTTP_CLIENT_TIMEOUT
public static final HttpStatus HTTP_CONFLICT
public static final HttpStatus HTTP_GONE
public static final HttpStatus HTTP_LENGTH_REQUIRED
public static final HttpStatus HTTP_PRECON_FAILED
public static final HttpStatus HTTP_ENTITY_TOO_LARGE
public static final HttpStatus HTTP_REQ_TOO_LONG
public static final HttpStatus HTTP_UNSUPPORTED_TYPE
public static final HttpStatus HTTP_INTERNAL_ERROR
public static final HttpStatus HTTP_NOT_IMPLEMENTED
public static final HttpStatus HTTP_BAD_GATEWAY
public static final HttpStatus HTTP_UNAVAILABLE
public static final HttpStatus HTTP_GATEWAY_TIMEOUT
public static final HttpStatus HTTP_VERSION
public static HttpStatus[] values()
for (HttpStatus c : HttpStatus.values()) System.out.println(c);
public static HttpStatus valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int code()
public java.lang.String description()
public static HttpStatus of(int code)
code - A HTTP status code integer valuepublic static boolean isOkRange(int code)
code - A HTTP status code integer valuepublic static boolean isRedirectRange(int code)
code - A HTTP status code integer valuepublic static boolean isClientRange(int code)
code - A HTTP status code integer valuepublic static boolean isServerErrorRange(int code)
code - A HTTP status code integer valuepublic java.lang.String toString()
toString in class java.lang.Enum<HttpStatus>