Class HttpSC

java.lang.Object
org.apache.jena.web.HttpSC

public class HttpSC extends Object

HttpStatusCode enum class, for status codes based on various HTTP RFCs. (see table below)

  • Field Details

  • Constructor Details

    • HttpSC

      public HttpSC()
  • Method Details

    • getCode

      public static HttpSC.Code getCode(int code)
      Get the HttpStatusCode for a specific code
      Parameters:
      code - the code to lookup.
      Returns:
      the HttpSC if found, or null if not found.
    • getMessage

      public static 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 the Informational message 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 Informational messages.
    • isSuccess

      public static boolean isSuccess(int code)
      Simple test against an code to determine if it falls into the Success message 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 Success messages.
    • isRedirection

      public static boolean isRedirection(int code)
      Simple test against an code to determine if it falls into the Redirection message 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 Redirection messages.
    • 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 the Client Error message 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 Error messages.
    • isServerError

      public static boolean isServerError(int code)
      Simple test against an code to determine if it falls into the Server Error message 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 Error messages.