public class HttpStatus extends Object
enum
encapsulates the HTTP response status and
reason phrases as defined by RFC 2616
.Modifier and Type | Method and Description |
---|---|
static HttpStatus |
getHttpStatus(int statusCode) |
String |
getReasonPhrase() |
byte[] |
getReasonPhraseBytes() |
byte[] |
getStatusBytes() |
int |
getStatusCode() |
static HttpStatus |
newHttpStatus(int statusCode,
String reasonPhrase) |
void |
setValues(HttpResponsePacket response)
Sets the status and reason phrase on the specified response.
|
boolean |
statusMatches(int status) |
public static final HttpStatus CONINTUE_100
public static final HttpStatus SWITCHING_PROTOCOLS_101
public static final HttpStatus WEB_SOCKET_PROTOCOL_HANDSHAKE_101
public static final HttpStatus OK_200
public static final HttpStatus CREATED_201
public static final HttpStatus ACCEPTED_202
public static final HttpStatus NON_AUTHORATIVE_INFORMATION_203
public static final HttpStatus NO_CONTENT_204
public static final HttpStatus RESET_CONTENT_205
public static final HttpStatus PARTIAL_CONTENT_206
public static final HttpStatus MULTIPLE_CHOICES_300
public static final HttpStatus MOVED_PERMANENTLY_301
public static final HttpStatus FOUND_302
public static final HttpStatus SEE_OTHER_303
public static final HttpStatus NOT_MODIFIED_304
public static final HttpStatus USE_PROXY_305
public static final HttpStatus TEMPORARY_REDIRECT_307
public static final HttpStatus PERMANENT_REDIRECT_308
public static final HttpStatus BAD_REQUEST_400
public static final HttpStatus UNAUTHORIZED_401
public static final HttpStatus PAYMENT_REQUIRED_402
public static final HttpStatus FORBIDDEN_403
public static final HttpStatus NOT_FOUND_404
public static final HttpStatus METHOD_NOT_ALLOWED_405
public static final HttpStatus NOT_ACCEPTABLE_406
public static final HttpStatus PROXY_AUTHENTICATION_REQUIRED_407
public static final HttpStatus REQUEST_TIMEOUT_408
public static final HttpStatus CONFLICT_409
public static final HttpStatus GONE_410
public static final HttpStatus LENGTH_REQUIRED_411
public static final HttpStatus PRECONDITION_FAILED_412
public static final HttpStatus REQUEST_ENTITY_TOO_LARGE_413
public static final HttpStatus REQUEST_URI_TOO_LONG_414
public static final HttpStatus UNSUPPORTED_MEDIA_TYPE_415
public static final HttpStatus REQUEST_RANGE_NOT_SATISFIABLE_416
public static final HttpStatus EXPECTATION_FAILED_417
public static final HttpStatus INTERNAL_SERVER_ERROR_500
public static final HttpStatus NOT_IMPLEMENTED_501
public static final HttpStatus BAD_GATEWAY_502
public static final HttpStatus SERVICE_UNAVAILABLE_503
public static final HttpStatus GATEWAY_TIMEOUT_504
public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED_505
public static HttpStatus newHttpStatus(int statusCode, String reasonPhrase)
public static HttpStatus getHttpStatus(int statusCode)
statusCode
- HTTP status codeHttpStatus
representation of the status.public boolean statusMatches(int status)
true
if the specified int status code matches
the status of this HttpStatus
.public int getStatusCode()
int
status code.public byte[] getStatusBytes()
public String getReasonPhrase()
String
representation of the reason phrase.public byte[] getReasonPhraseBytes()
RFC 2616
.public void setValues(HttpResponsePacket response)
response
- the response to set the status and reason phrase on.Copyright © 2015 Oracle Corporation. All rights reserved.