public static enum HttpSC.Code extends Enum<HttpSC.Code>
| Enum Constant and Description |
|---|
ACCEPTED
202 Accepted |
BAD_GATEWAY
502 Bad Gateway |
BAD_REQUEST
400 Bad Request |
CONFLICT
409 Conflict |
CONTINUE
100 Continue |
CREATED
201 Created |
EXPECTATION_FAILED
417 Expectation Failed |
FAILED_DEPENDENCY
424 Failed Dependency |
FORBIDDEN
403 Forbidden |
FOUND
302 Found |
GATEWAY_TIMEOUT
504 Gateway Timeout |
GONE
410 Gone |
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported |
I_AM_A_TEAPOT
417 I'm a teapot
The response MAY be short and stout. |
INSUFFICIENT_STORAGE
507 Insufficient Storage |
INTERNAL_SERVER_ERROR
500 Server Error |
LENGTH_REQUIRED
411 Length Required |
LOCKED
423 Locked |
METHOD_NOT_ALLOWED
405 Method Not Allowed |
MOVED_PERMANENTLY
301 Moved Permanently |
MOVED_TEMPORARILY
302 Moved Temporarily |
MULTI_STATUS
207 Multi-Status |
MULTIPLE_CHOICES
300 Mutliple Choices |
NO_CONTENT
204 No Content |
NON_AUTHORITATIVE_INFORMATION
203 Non Authoritative Information |
NOT_ACCEPTABLE
406 Not Acceptable |
NOT_FOUND
404 Not Found |
NOT_IMPLEMENTED
501 Not Implemented |
NOT_MODIFIED
304 Not Modified |
OK
200 OK |
PARTIAL_CONTENT
206 Partial Content |
PAYMENT_REQUIRED
402 Payment Required |
PRECONDITION_FAILED
412 Precondition Failed |
PROCESSING
102 Processing |
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required |
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large |
REQUEST_TIMEOUT
408 Request Timeout |
REQUEST_URI_TOO_LONG
414 Request-URI Too Long |
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable |
RESET_CONTENT
205 Reset Content |
SEE_OTHER
303 See Other |
SERVICE_UNAVAILABLE
503 Service Unavailable |
SWITCHING_PROTOCOLS
101 Switching Protocols |
TEMPORARY_REDIRECT
307 Temporary Redirect |
UNAUTHORIZED
401 Unauthorized |
UNPROCESSABLE_ENTITY
422 Unprocessable Entity |
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type |
USE_PROXY
305 Use Proxy |
| 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 2616 -
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 2616 -
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 2616 -
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 2616 -
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 2616 -
HTTP/1.1. |
String |
toString() |
static HttpSC.Code |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpSC.Code[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpSC.Code CONTINUE
100 Continuepublic static final HttpSC.Code SWITCHING_PROTOCOLS
101 Switching Protocolspublic static final HttpSC.Code PROCESSING
102 Processingpublic static final HttpSC.Code OK
200 OKpublic static final HttpSC.Code CREATED
201 Createdpublic static final HttpSC.Code ACCEPTED
202 Acceptedpublic static final HttpSC.Code NON_AUTHORITATIVE_INFORMATION
203 Non Authoritative Informationpublic static final HttpSC.Code NO_CONTENT
204 No Contentpublic static final HttpSC.Code RESET_CONTENT
205 Reset Contentpublic static final HttpSC.Code PARTIAL_CONTENT
206 Partial Contentpublic static final HttpSC.Code MULTI_STATUS
207 Multi-Statuspublic static final HttpSC.Code MULTIPLE_CHOICES
300 Mutliple Choicespublic static final HttpSC.Code MOVED_PERMANENTLY
301 Moved Permanentlypublic static final HttpSC.Code MOVED_TEMPORARILY
302 Moved Temporarilypublic static final HttpSC.Code FOUND
302 Foundpublic static final HttpSC.Code SEE_OTHER
303 See Otherpublic static final HttpSC.Code NOT_MODIFIED
304 Not Modifiedpublic static final HttpSC.Code USE_PROXY
305 Use Proxypublic static final HttpSC.Code TEMPORARY_REDIRECT
307 Temporary Redirectpublic static final HttpSC.Code BAD_REQUEST
400 Bad Requestpublic static final HttpSC.Code UNAUTHORIZED
401 Unauthorizedpublic static final HttpSC.Code PAYMENT_REQUIRED
402 Payment Requiredpublic static final HttpSC.Code FORBIDDEN
403 Forbiddenpublic static final HttpSC.Code NOT_FOUND
404 Not Foundpublic static final HttpSC.Code METHOD_NOT_ALLOWED
405 Method Not Allowedpublic static final HttpSC.Code NOT_ACCEPTABLE
406 Not Acceptablepublic static final HttpSC.Code PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Requiredpublic static final HttpSC.Code REQUEST_TIMEOUT
408 Request Timeoutpublic static final HttpSC.Code CONFLICT
409 Conflictpublic static final HttpSC.Code GONE
410 Gonepublic static final HttpSC.Code LENGTH_REQUIRED
411 Length Requiredpublic static final HttpSC.Code PRECONDITION_FAILED
412 Precondition Failedpublic static final HttpSC.Code REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Largepublic static final HttpSC.Code REQUEST_URI_TOO_LONG
414 Request-URI Too Longpublic static final HttpSC.Code UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Typepublic static final HttpSC.Code REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiablepublic static final HttpSC.Code EXPECTATION_FAILED
417 Expectation Failedpublic static final HttpSC.Code I_AM_A_TEAPOT
417 I'm a teapot
The response MAY be short and stout.public static final HttpSC.Code UNPROCESSABLE_ENTITY
422 Unprocessable Entitypublic static final HttpSC.Code LOCKED
423 Lockedpublic static final HttpSC.Code FAILED_DEPENDENCY
424 Failed Dependencypublic static final HttpSC.Code INTERNAL_SERVER_ERROR
500 Server Errorpublic static final HttpSC.Code NOT_IMPLEMENTED
501 Not Implementedpublic static final HttpSC.Code BAD_GATEWAY
502 Bad Gatewaypublic static final HttpSC.Code SERVICE_UNAVAILABLE
503 Service Unavailablepublic static final HttpSC.Code GATEWAY_TIMEOUT
504 Gateway Timeoutpublic static final HttpSC.Code HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supportedpublic static final HttpSC.Code INSUFFICIENT_STORAGE
507 Insufficient Storagepublic static HttpSC.Code[] values()
for (HttpSC.Code c : HttpSC.Code.values()) System.out.println(c);
public static HttpSC.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<HttpSC.Code>public boolean isInformational()
Informational message category as defined in the RFC 1945 - HTTP/1.0,
and RFC 2616 -
HTTP/1.1.Informational messages.public boolean isSuccess()
Success message category as defined in the RFC 1945 - HTTP/1.0,
and RFC 2616 -
HTTP/1.1.Success messages.public boolean isRedirection()
Redirection message category as defined in the RFC 1945 - HTTP/1.0,
and RFC 2616 -
HTTP/1.1.Redirection messages.public boolean isClientError()
Client Error message category as defined in the RFC 1945 - HTTP/1.0,
and RFC 2616 -
HTTP/1.1.Client Error messages.public boolean isServerError()
Server Error message category as defined in the RFC 1945 - HTTP/1.0,
and RFC 2616 -
HTTP/1.1.Server Error messages.Licenced under the Apache License, Version 2.0