Package org.apache.jena.web
Class HttpSC
- java.lang.Object
-
- org.apache.jena.web.HttpSC
-
public class HttpSC extends java.lang.ObjectHttpStatusCode enum class, for status codes based on various HTTP RFCs. (see table below)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpSC.Code
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HttpSC()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HttpSC.CodegetCode(int code)Get the HttpStatusCode for a specific codestatic java.lang.StringgetMessage(int code)Get the status message for a specific code.static booleanisClientError(int code)Simple test against an code to determine if it falls into theClient Errormessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.static booleanisError(int code)static booleanisInformational(int code)Simple test against an code to determine if it falls into theInformationalmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.static booleanisRedirection(int code)Simple test against an code to determine if it falls into theRedirectionmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.static booleanisServerError(int code)Simple test against an code to determine if it falls into theServer Errormessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.static booleanisSuccess(int code)Simple test against an code to determine if it falls into theSuccessmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
-
-
-
Field Detail
-
CONTINUE_100
public static final int CONTINUE_100
- See Also:
- Constant Field Values
-
SWITCHING_PROTOCOLS_101
public static final int SWITCHING_PROTOCOLS_101
- See Also:
- Constant Field Values
-
PROCESSING_102
public static final int PROCESSING_102
- See Also:
- Constant Field Values
-
OK_200
public static final int OK_200
- See Also:
- Constant Field Values
-
CREATED_201
public static final int CREATED_201
- See Also:
- Constant Field Values
-
ACCEPTED_202
public static final int ACCEPTED_202
- See Also:
- Constant Field Values
-
NON_AUTHORITATIVE_INFORMATION_203
public static final int NON_AUTHORITATIVE_INFORMATION_203
- See Also:
- Constant Field Values
-
NO_CONTENT_204
public static final int NO_CONTENT_204
- See Also:
- Constant Field Values
-
RESET_CONTENT_205
public static final int RESET_CONTENT_205
- See Also:
- Constant Field Values
-
PARTIAL_CONTENT_206
public static final int PARTIAL_CONTENT_206
- See Also:
- Constant Field Values
-
MULTI_STATUS_207
public static final int MULTI_STATUS_207
- See Also:
- Constant Field Values
-
MULTIPLE_CHOICES_300
public static final int MULTIPLE_CHOICES_300
- See Also:
- Constant Field Values
-
MOVED_PERMANENTLY_301
public static final int MOVED_PERMANENTLY_301
- See Also:
- Constant Field Values
-
MOVED_TEMPORARILY_302
public static final int MOVED_TEMPORARILY_302
- See Also:
- Constant Field Values
-
FOUND_302
public static final int FOUND_302
- See Also:
- Constant Field Values
-
SEE_OTHER_303
public static final int SEE_OTHER_303
- See Also:
- Constant Field Values
-
NOT_MODIFIED_304
public static final int NOT_MODIFIED_304
- See Also:
- Constant Field Values
-
USE_PROXY_305
public static final int USE_PROXY_305
- See Also:
- Constant Field Values
-
TEMPORARY_REDIRECT_307
public static final int TEMPORARY_REDIRECT_307
- See Also:
- Constant Field Values
-
BAD_REQUEST_400
public static final int BAD_REQUEST_400
- See Also:
- Constant Field Values
-
UNAUTHORIZED_401
public static final int UNAUTHORIZED_401
- See Also:
- Constant Field Values
-
PAYMENT_REQUIRED_402
public static final int PAYMENT_REQUIRED_402
- See Also:
- Constant Field Values
-
FORBIDDEN_403
public static final int FORBIDDEN_403
- See Also:
- Constant Field Values
-
NOT_FOUND_404
public static final int NOT_FOUND_404
- See Also:
- Constant Field Values
-
METHOD_NOT_ALLOWED_405
public static final int METHOD_NOT_ALLOWED_405
- See Also:
- Constant Field Values
-
NOT_ACCEPTABLE_406
public static final int NOT_ACCEPTABLE_406
- See Also:
- Constant Field Values
-
PROXY_AUTHENTICATION_REQUIRED_407
public static final int PROXY_AUTHENTICATION_REQUIRED_407
- See Also:
- Constant Field Values
-
REQUEST_TIMEOUT_408
public static final int REQUEST_TIMEOUT_408
- See Also:
- Constant Field Values
-
CONFLICT_409
public static final int CONFLICT_409
- See Also:
- Constant Field Values
-
GONE_410
public static final int GONE_410
- See Also:
- Constant Field Values
-
LENGTH_REQUIRED_411
public static final int LENGTH_REQUIRED_411
- See Also:
- Constant Field Values
-
PRECONDITION_FAILED_412
public static final int PRECONDITION_FAILED_412
- See Also:
- Constant Field Values
-
REQUEST_ENTITY_TOO_LARGE_413
public static final int REQUEST_ENTITY_TOO_LARGE_413
- See Also:
- Constant Field Values
-
REQUEST_URI_TOO_LONG_414
public static final int REQUEST_URI_TOO_LONG_414
- See Also:
- Constant Field Values
-
UNSUPPORTED_MEDIA_TYPE_415
public static final int UNSUPPORTED_MEDIA_TYPE_415
- See Also:
- Constant Field Values
-
REQUESTED_RANGE_NOT_SATISFIABLE_416
public static final int REQUESTED_RANGE_NOT_SATISFIABLE_416
- See Also:
- Constant Field Values
-
EXPECTATION_FAILED_417
public static final int EXPECTATION_FAILED_417
- See Also:
- Constant Field Values
-
I_AM_A_TEAPOT_418
public static final int I_AM_A_TEAPOT_418
- See Also:
- Constant Field Values
-
UNPROCESSABLE_ENTITY_422
public static final int UNPROCESSABLE_ENTITY_422
- See Also:
- Constant Field Values
-
LOCKED_423
public static final int LOCKED_423
- See Also:
- Constant Field Values
-
FAILED_DEPENDENCY_424
public static final int FAILED_DEPENDENCY_424
- See Also:
- Constant Field Values
-
INTERNAL_SERVER_ERROR_500
public static final int INTERNAL_SERVER_ERROR_500
- See Also:
- Constant Field Values
-
NOT_IMPLEMENTED_501
public static final int NOT_IMPLEMENTED_501
- See Also:
- Constant Field Values
-
BAD_GATEWAY_502
public static final int BAD_GATEWAY_502
- See Also:
- Constant Field Values
-
SERVICE_UNAVAILABLE_503
public static final int SERVICE_UNAVAILABLE_503
- See Also:
- Constant Field Values
-
GATEWAY_TIMEOUT_504
public static final int GATEWAY_TIMEOUT_504
- See Also:
- Constant Field Values
-
HTTP_VERSION_NOT_SUPPORTED_505
public static final int HTTP_VERSION_NOT_SUPPORTED_505
- See Also:
- Constant Field Values
-
INSUFFICIENT_STORAGE_507
public static final int INSUFFICIENT_STORAGE_507
- See Also:
- Constant Field Values
-
MAX_CODE
public static final int MAX_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCode
public static HttpSC.Code getCode(int code)
Get the HttpStatusCode for a specific code- Parameters:
code- the code to lookup.- Returns:
- the
HttpSCif found, or null if not found.
-
getMessage
public static java.lang.String getMessage(int code)
Get the status message for a specific code.- Parameters:
code- the code to look up- Returns:
- the specific message, or the code number itself if code does not match known list.
-
isInformational
public static boolean isInformational(int code)
Simple test against an code to determine if it falls into theInformationalmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.- Parameters:
code- the code to test.- Returns:
- true if within range of codes that belongs to
Informationalmessages.
-
isSuccess
public static boolean isSuccess(int code)
Simple test against an code to determine if it falls into theSuccessmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.- Parameters:
code- the code to test.- Returns:
- true if within range of codes that belongs to
Successmessages.
-
isRedirection
public static boolean isRedirection(int code)
Simple test against an code to determine if it falls into theRedirectionmessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.- Parameters:
code- the code to test.- Returns:
- true if within range of codes that belongs to
Redirectionmessages.
-
isError
public static boolean isError(int code)
-
isClientError
public static boolean isClientError(int code)
Simple test against an code to determine if it falls into theClient Errormessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.- Parameters:
code- the code to test.- Returns:
- true if within range of codes that belongs to
Client Errormessages.
-
isServerError
public static boolean isServerError(int code)
Simple test against an code to determine if it falls into theServer Errormessage category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.- Parameters:
code- the code to test.- Returns:
- true if within range of codes that belongs to
Server Errormessages.
-
-