de.unkrig.commons.net.http
Enum HttpResponse.Status
java.lang.Object
java.lang.Enum<HttpResponse.Status>
de.unkrig.commons.net.http.HttpResponse.Status
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<HttpResponse.Status>
- Enclosing class:
- HttpResponse
public static enum HttpResponse.Status
- extends java.lang.Enum<HttpResponse.Status>
Representation of the various HTTP response statuses.
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
CONTINUE
public static final HttpResponse.Status CONTINUE
SWITCHING_PROTOCOLS
public static final HttpResponse.Status SWITCHING_PROTOCOLS
OK
public static final HttpResponse.Status OK
CREATED
public static final HttpResponse.Status CREATED
ACCEPTED
public static final HttpResponse.Status ACCEPTED
NON_AUTHORITATIVE_INFORMATION
public static final HttpResponse.Status NON_AUTHORITATIVE_INFORMATION
NO_CONTENT
public static final HttpResponse.Status NO_CONTENT
RESET_CONTENT
public static final HttpResponse.Status RESET_CONTENT
PARTIAL_CONTENT
public static final HttpResponse.Status PARTIAL_CONTENT
MULTIPLE_CHOICES
public static final HttpResponse.Status MULTIPLE_CHOICES
MOVED_PERMANENTLY
public static final HttpResponse.Status MOVED_PERMANENTLY
FOUND
public static final HttpResponse.Status FOUND
SEE_OTHER
public static final HttpResponse.Status SEE_OTHER
NOT_MODIFIED
public static final HttpResponse.Status NOT_MODIFIED
USE_PROXY
public static final HttpResponse.Status USE_PROXY
TEMPORARY_REDIRECT
public static final HttpResponse.Status TEMPORARY_REDIRECT
BAD_REQUEST
public static final HttpResponse.Status BAD_REQUEST
UNAUTHORIZED
public static final HttpResponse.Status UNAUTHORIZED
PAYMENT_REQUIRED
public static final HttpResponse.Status PAYMENT_REQUIRED
FORBIDDEN
public static final HttpResponse.Status FORBIDDEN
NOT_FOUND
public static final HttpResponse.Status NOT_FOUND
METHOD_NOT_ALLOWED
public static final HttpResponse.Status METHOD_NOT_ALLOWED
NOT_ACCEPTABLE
public static final HttpResponse.Status NOT_ACCEPTABLE
PROXY_AUTHENTICATION_REQUIRED
public static final HttpResponse.Status PROXY_AUTHENTICATION_REQUIRED
REQUEST_TIMEOUT
public static final HttpResponse.Status REQUEST_TIMEOUT
CONFLICT
public static final HttpResponse.Status CONFLICT
GONE
public static final HttpResponse.Status GONE
LENGTH_REQUIRED
public static final HttpResponse.Status LENGTH_REQUIRED
PRECONDITION_FAILED
public static final HttpResponse.Status PRECONDITION_FAILED
REQUEST_ENTITY_TOO_LARGE
public static final HttpResponse.Status REQUEST_ENTITY_TOO_LARGE
REQEST_URI_TOO_LONG
public static final HttpResponse.Status REQEST_URI_TOO_LONG
UNSUPPORTED_MEDIA_TYPE
public static final HttpResponse.Status UNSUPPORTED_MEDIA_TYPE
REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpResponse.Status REQUESTED_RANGE_NOT_SATISFIABLE
EXPECTATION_FAILED
public static final HttpResponse.Status EXPECTATION_FAILED
INTERNAL_SERVER_ERROR
public static final HttpResponse.Status INTERNAL_SERVER_ERROR
NOT_IMPLEMENTED
public static final HttpResponse.Status NOT_IMPLEMENTED
BAD_GATEWAY
public static final HttpResponse.Status BAD_GATEWAY
SERVICE_UNAVAILABLE
public static final HttpResponse.Status SERVICE_UNAVAILABLE
GATEWAY_TIMEOUT
public static final HttpResponse.Status GATEWAY_TIMEOUT
HTTP_VERSION_NOT_SUPPORTED
public static final HttpResponse.Status HTTP_VERSION_NOT_SUPPORTED
values
public static HttpResponse.Status[] 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 (HttpResponse.Status c : HttpResponse.Status.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static HttpResponse.Status 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
getCode
public int getCode()
- Returns:
- This HTTP response's code
getReasonPhrase
public java.lang.String getReasonPhrase()
- Returns:
- This HTTP response's reason phrase, i.e. the text in the status line after the response code
hasBody
public boolean hasBody()
- Returns:
- Whether this HTTP response has a body
fromCode
@Nullable
public static HttpResponse.Status fromCode(int code)
- Returns:
null iff a status with that code does not exist