public enum HttpStatusCode extends Enum<HttpStatusCode>
Modifier and Type | Method and Description |
---|---|
static HttpStatusCode |
fromStatusCode(int statusCode)
Converts a numerical status code into the corresponding status enum object.
|
String |
getInfo()
Gets the status code info.
|
int |
getStatusCode()
Gets the associated status code.
|
String |
toString()
The status code info is the readable form of the status code.
|
static HttpStatusCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpStatusCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpStatusCode CONTINUE
public static final HttpStatusCode SWITCHING_PROTOCOLS
public static final HttpStatusCode OK
public static final HttpStatusCode CREATED
public static final HttpStatusCode ACCEPTED
public static final HttpStatusCode NO_CONTENT
public static final HttpStatusCode RESET_CONTENT
public static final HttpStatusCode PARTIAL_CONTENT
public static final HttpStatusCode MOVED_PERMANENTLY
public static final HttpStatusCode FOUND
public static final HttpStatusCode SEE_OTHER
public static final HttpStatusCode NOT_MODIFIED
public static final HttpStatusCode USE_PROXY
public static final HttpStatusCode TEMPORARY_REDIRECT
public static final HttpStatusCode BAD_REQUEST
public static final HttpStatusCode UNAUTHORIZED
public static final HttpStatusCode PAYMENT_REQUIRED
public static final HttpStatusCode FORBIDDEN
public static final HttpStatusCode NOT_FOUND
public static final HttpStatusCode METHOD_NOT_ALLOWED
public static final HttpStatusCode NOT_ACCEPTABLE
public static final HttpStatusCode PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatusCode REQUEST_TIMEOUT
public static final HttpStatusCode CONFLICT
public static final HttpStatusCode GONE
public static final HttpStatusCode LENGTH_REQUIRED
public static final HttpStatusCode PRECONDITION_FAILED
public static final HttpStatusCode PAYLOAD_TOO_LARGE
public static final HttpStatusCode URI_TOO_LONG
public static final HttpStatusCode UNSUPPORTED_MEDIA_TYPE
public static final HttpStatusCode RANGE_NOT_SATISFIABLE
public static final HttpStatusCode EXPECTATION_FAILED
public static final HttpStatusCode PRECONDITION_REQUIRED
public static final HttpStatusCode INTERNAL_SERVER_ERROR
public static final HttpStatusCode NOT_IMPLEMENTED
public static final HttpStatusCode BAD_GATEWAY
public static final HttpStatusCode SERVICE_UNAVAILABLE
public static final HttpStatusCode GATEWAY_TIMEOUT
public static final HttpStatusCode HTTP_VERSION_NOT_SUPPORTED
public static HttpStatusCode[] values()
for (HttpStatusCode c : HttpStatusCode.values()) System.out.println(c);
public static HttpStatusCode 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 static HttpStatusCode fromStatusCode(int statusCode)
statusCode
- the numerical status codepublic int getStatusCode()
public String getInfo()
public String toString()
toString
in class Enum<HttpStatusCode>
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.