org.eclipse.jetty.http

## Enum HttpStatus.Code

- java.lang.Object
- - java.lang.Enum<HttpStatus.Code>
  - - org.eclipse.jetty.http.HttpStatus.Code

- All Implemented Interfaces:
    Serializable, Comparable<HttpStatus.Code>
  Enclosing class:
    HttpStatus

      public static enum HttpStatus.Code
      extends Enum<HttpStatus.Code>

- - ### Enum Constant Summary

    Enum Constants
    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`
    `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`

  - ### Method Summary

    Methods
    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 HttpStatus.Code` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static HttpStatus.Code[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CONTINUE

          public static final HttpStatus.Code CONTINUE

      `100 Continue`

    - #### SWITCHING_PROTOCOLS

          public static final HttpStatus.Code SWITCHING_PROTOCOLS

      `101 Switching Protocols`

    - #### PROCESSING

          public static final HttpStatus.Code PROCESSING

      `102 Processing`

    - #### OK

          public static final HttpStatus.Code OK

      `200 OK`

    - #### CREATED

          public static final HttpStatus.Code CREATED

      `201 Created`

    - #### ACCEPTED

          public static final HttpStatus.Code ACCEPTED

      `202 Accepted`

    - #### NON_AUTHORITATIVE_INFORMATION

          public static final HttpStatus.Code NON_AUTHORITATIVE_INFORMATION

      `203 Non Authoritative Information`

    - #### NO_CONTENT

          public static final HttpStatus.Code NO_CONTENT

      `204 No Content`

    - #### RESET_CONTENT

          public static final HttpStatus.Code RESET_CONTENT

      `205 Reset Content`

    - #### PARTIAL_CONTENT

          public static final HttpStatus.Code PARTIAL_CONTENT

      `206 Partial Content`

    - #### MULTI_STATUS

          public static final HttpStatus.Code MULTI_STATUS

      `207 Multi-Status`

    - #### MULTIPLE_CHOICES

          public static final HttpStatus.Code MULTIPLE_CHOICES

      `300 Mutliple Choices`

    - #### MOVED_PERMANENTLY

          public static final HttpStatus.Code MOVED_PERMANENTLY

      `301 Moved Permanently`

    - #### MOVED_TEMPORARILY

          public static final HttpStatus.Code MOVED_TEMPORARILY

      `302 Moved Temporarily`

    - #### FOUND

          public static final HttpStatus.Code FOUND

      `302 Found`

    - #### SEE_OTHER

          public static final HttpStatus.Code SEE_OTHER

      `303 See Other`

    - #### NOT_MODIFIED

          public static final HttpStatus.Code NOT_MODIFIED

      `304 Not Modified`

    - #### USE_PROXY

          public static final HttpStatus.Code USE_PROXY

      `305 Use Proxy`

    - #### TEMPORARY_REDIRECT

          public static final HttpStatus.Code TEMPORARY_REDIRECT

      `307 Temporary Redirect`

    - #### BAD_REQUEST

          public static final HttpStatus.Code BAD_REQUEST

      `400 Bad Request`

    - #### UNAUTHORIZED

          public static final HttpStatus.Code UNAUTHORIZED

      `401 Unauthorized`

    - #### PAYMENT_REQUIRED

          public static final HttpStatus.Code PAYMENT_REQUIRED

      `402 Payment Required`

    - #### FORBIDDEN

          public static final HttpStatus.Code FORBIDDEN

      `403 Forbidden`

    - #### NOT_FOUND

          public static final HttpStatus.Code NOT_FOUND

      `404 Not Found`

    - #### METHOD_NOT_ALLOWED

          public static final HttpStatus.Code METHOD_NOT_ALLOWED

      `405 Method Not Allowed`

    - #### NOT_ACCEPTABLE

          public static final HttpStatus.Code NOT_ACCEPTABLE

      `406 Not Acceptable`

    - #### PROXY_AUTHENTICATION_REQUIRED

          public static final HttpStatus.Code PROXY_AUTHENTICATION_REQUIRED

      `407 Proxy Authentication Required`

    - #### REQUEST_TIMEOUT

          public static final HttpStatus.Code REQUEST_TIMEOUT

      `408 Request Timeout`

    - #### CONFLICT

          public static final HttpStatus.Code CONFLICT

      `409 Conflict`

    - #### GONE

          public static final HttpStatus.Code GONE

      `410 Gone`

    - #### LENGTH_REQUIRED

          public static final HttpStatus.Code LENGTH_REQUIRED

      `411 Length Required`

    - #### PRECONDITION_FAILED

          public static final HttpStatus.Code PRECONDITION_FAILED

      `412 Precondition Failed`

    - #### REQUEST_ENTITY_TOO_LARGE

          public static final HttpStatus.Code REQUEST_ENTITY_TOO_LARGE

      `413 Request Entity Too Large`

    - #### REQUEST_URI_TOO_LONG

          public static final HttpStatus.Code REQUEST_URI_TOO_LONG

      `414 Request-URI Too Long`

    - #### UNSUPPORTED_MEDIA_TYPE

          public static final HttpStatus.Code UNSUPPORTED_MEDIA_TYPE

      `415 Unsupported Media Type`

    - #### REQUESTED_RANGE_NOT_SATISFIABLE

          public static final HttpStatus.Code REQUESTED_RANGE_NOT_SATISFIABLE

      `416 Requested Range Not Satisfiable`

    - #### EXPECTATION_FAILED

          public static final HttpStatus.Code EXPECTATION_FAILED

      `417 Expectation Failed`

    - #### UNPROCESSABLE_ENTITY

          public static final HttpStatus.Code UNPROCESSABLE_ENTITY

      `422 Unprocessable Entity`

    - #### LOCKED

          public static final HttpStatus.Code LOCKED

      `423 Locked`

    - #### FAILED_DEPENDENCY

          public static final HttpStatus.Code FAILED_DEPENDENCY

      `424 Failed Dependency`

    - #### INTERNAL_SERVER_ERROR

          public static final HttpStatus.Code INTERNAL_SERVER_ERROR

      `500 Server Error`

    - #### NOT_IMPLEMENTED

          public static final HttpStatus.Code NOT_IMPLEMENTED

      `501 Not Implemented`

    - #### BAD_GATEWAY

          public static final HttpStatus.Code BAD_GATEWAY

      `502 Bad Gateway`

    - #### SERVICE_UNAVAILABLE

          public static final HttpStatus.Code SERVICE_UNAVAILABLE

      `503 Service Unavailable`

    - #### GATEWAY_TIMEOUT

          public static final HttpStatus.Code GATEWAY_TIMEOUT

      `504 Gateway Timeout`

    - #### HTTP_VERSION_NOT_SUPPORTED

          public static final HttpStatus.Code HTTP_VERSION_NOT_SUPPORTED

      `505 HTTP Version Not Supported`

    - #### INSUFFICIENT_STORAGE

          public static final HttpStatus.Code INSUFFICIENT_STORAGE

      `507 Insufficient Storage`

  - ### Method Detail

    - #### values

          public static HttpStatus.Code[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (HttpStatus.Code c : HttpStatus.Code.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static HttpStatus.Code valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getCode

          public int getCode()

    - #### getMessage

          public String getMessage()

    - #### equals

          public boolean equals(int code)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<HttpStatus.Code>`

    - #### isInformational

          public 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.
      Returns:
        true if within range of codes that belongs to `Informational` messages.

    - #### isSuccess

          public 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.
      Returns:
        true if within range of codes that belongs to `Success` messages.

    - #### isRedirection

          public 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.
      Returns:
        true if within range of codes that belongs to `Redirection` messages.

    - #### isClientError

          public 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.
      Returns:
        true if within range of codes that belongs to `Client Error` messages.

    - #### isServerError

          public 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.
      Returns:
        true if within range of codes that belongs to `Server Error` messages.

Copyright © 1995-2016 Mort Bay Consulting. All Rights Reserved.