com.partnersoft.net.http
Enum HttpStatusCode
java.lang.Object
java.lang.Enum<HttpStatusCode>
com.partnersoft.net.http.HttpStatusCode
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<HttpStatusCode>
public enum HttpStatusCode
- extends java.lang.Enum<HttpStatusCode>
HTTP status codes and descriptions. These were copied directly from
draft 6 (2009-03-09) of the working HTTP/1.1 specifications at http://www.w3c.org.
Copyright 2009 Partner Software, Inc.
- Version:
- $Id$
- Author:
- Paul Reavis
| 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 |
CONTINUE
public static final HttpStatusCode CONTINUE
SWITCHING_PROTOCOLS
public static final HttpStatusCode SWITCHING_PROTOCOLS
OK
public static final HttpStatusCode OK
CREATED
public static final HttpStatusCode CREATED
ACCEPTED
public static final HttpStatusCode ACCEPTED
NON_AUTHORITATIVE_INFORMATION
public static final HttpStatusCode NON_AUTHORITATIVE_INFORMATION
NO_CONTENT
public static final HttpStatusCode NO_CONTENT
RESET_CONTENT
public static final HttpStatusCode RESET_CONTENT
PARTIAL_CONTENT
public static final HttpStatusCode PARTIAL_CONTENT
MULTIPLE_CHOICES
public static final HttpStatusCode MULTIPLE_CHOICES
MOVED_PERMANENTLY
public static final HttpStatusCode MOVED_PERMANENTLY
FOUND
public static final HttpStatusCode FOUND
SEE_OTHER
public static final HttpStatusCode SEE_OTHER
NOT_MODIFIED
public static final HttpStatusCode NOT_MODIFIED
USE_PROXY
public static final HttpStatusCode USE_PROXY
UNUSED_306
public static final HttpStatusCode UNUSED_306
TEMPORARY_REDIRECT
public static final HttpStatusCode TEMPORARY_REDIRECT
BAD_REQUEST
public static final HttpStatusCode BAD_REQUEST
UNAUTHORIZED
public static final HttpStatusCode UNAUTHORIZED
PAYMENT_REQUIRED
public static final HttpStatusCode PAYMENT_REQUIRED
FORBIDDEN
public static final HttpStatusCode FORBIDDEN
NOT_FOUND
public static final HttpStatusCode NOT_FOUND
METHOD_NOT_ALLOWED
public static final HttpStatusCode METHOD_NOT_ALLOWED
NOT_ACCEPTABLE
public static final HttpStatusCode NOT_ACCEPTABLE
PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatusCode PROXY_AUTHENTICATION_REQUIRED
REQUEST_TIMEOUT
public static final HttpStatusCode REQUEST_TIMEOUT
CONFLICT
public static final HttpStatusCode CONFLICT
GONE
public static final HttpStatusCode GONE
LENGTH_REQUIRED
public static final HttpStatusCode LENGTH_REQUIRED
PRECONDITION_FAILED
public static final HttpStatusCode PRECONDITION_FAILED
REQUEST_ENTITY_TOO_LARGE
public static final HttpStatusCode REQUEST_ENTITY_TOO_LARGE
REQUEST_URI_TOO_LONG
public static final HttpStatusCode REQUEST_URI_TOO_LONG
UNSUPPORTED_MEDIA_TYPE
public static final HttpStatusCode UNSUPPORTED_MEDIA_TYPE
REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpStatusCode REQUESTED_RANGE_NOT_SATISFIABLE
EXPECTATION_FAILED
public static final HttpStatusCode EXPECTATION_FAILED
INTERNAL_SERVER_ERROR
public static final HttpStatusCode INTERNAL_SERVER_ERROR
NOT_IMPLEMENTED
public static final HttpStatusCode NOT_IMPLEMENTED
BAD_GATEWAY
public static final HttpStatusCode BAD_GATEWAY
SERVICE_UNAVAILABLE
public static final HttpStatusCode SERVICE_UNAVAILABLE
GATEWAY_TIMEOUT
public static final HttpStatusCode GATEWAY_TIMEOUT
HTTP_VERSION_NOT_SUPPORTED
public static final HttpStatusCode HTTP_VERSION_NOT_SUPPORTED
values
public static HttpStatusCode[] 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 (HttpStatusCode c : HttpStatusCode.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static HttpStatusCode valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Enum<HttpStatusCode>
getCode
public int getCode()
getDescription
public java.lang.String getDescription()
forCode
public static HttpStatusCode forCode(java.lang.String string)
forCode
public static HttpStatusCode forCode(int code)