类 HttpStatusCodeException

所有已实现的接口:
Serializable
直接已知子类:
HttpClientErrorException, HttpServerErrorException

public abstract class HttpStatusCodeException extends RestClientResponseException
Abstract base class for exceptions based on an HttpStatusCode.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Chris Beams, Rossen Stoyanchev
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
  • 构造器详细资料

    • HttpStatusCodeException

      protected HttpStatusCodeException(HttpStatusCode statusCode)
      Construct a new instance with an HttpStatusCode.
      参数:
      statusCode - the status code
    • HttpStatusCodeException

      protected HttpStatusCodeException(HttpStatusCode statusCode, String statusText)
      Construct a new instance with an HttpStatusCode and status text.
      参数:
      statusCode - the status code
      statusText - the status text
    • HttpStatusCodeException

      protected HttpStatusCodeException(HttpStatusCode statusCode, String statusText, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
      Construct instance with an HttpStatusCode, status text, and content.
      参数:
      statusCode - the status code
      statusText - the status text
      responseBody - the response body content, may be null
      responseCharset - the response body charset, may be null
    • HttpStatusCodeException

      protected HttpStatusCodeException(HttpStatusCode statusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
      Construct instance with an HttpStatusCode, status text, content, and a response charset.
      参数:
      statusCode - the status code
      statusText - the status text
      responseHeaders - the response headers, may be null
      responseBody - the response body content, may be null
      responseCharset - the response body charset, may be null
    • HttpStatusCodeException

      protected HttpStatusCodeException(String message, HttpStatusCode statusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
      Construct instance with an HttpStatusCode, status text, content, and a response charset.
      参数:
      message - the exception message
      statusCode - the status code
      statusText - the status text
      responseHeaders - the response headers, may be null
      responseBody - the response body content, may be null
      responseCharset - the response body charset, may be null
  • 方法详细资料