| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.web.client.RestClientException
org.springframework.web.client.HttpStatusCodeException
public abstract class HttpStatusCodeException
Abstract base class for exceptions based on an HttpStatus.
| Constructor Summary | |
|---|---|
protected  | 
HttpStatusCodeException(HttpStatus statusCode)
Construct a new instance of HttpStatusCodeException based on an
 HttpStatus. | 
protected  | 
HttpStatusCodeException(HttpStatus statusCode,
                        String statusText)
Construct a new instance of HttpStatusCodeException based on an
 HttpStatus and status text. | 
protected  | 
HttpStatusCodeException(HttpStatus statusCode,
                        String statusText,
                        byte[] responseBody,
                        Charset responseCharset)
Construct a new instance of HttpStatusCodeException based on an
 HttpStatus, status text, and response body content. | 
protected  | 
HttpStatusCodeException(HttpStatus statusCode,
                        String statusText,
                        HttpHeaders responseHeaders,
                        byte[] responseBody,
                        Charset responseCharset)
Construct a new instance of HttpStatusCodeException based on an
 HttpStatus, status text, and response body content. | 
| Method Summary | |
|---|---|
 byte[] | 
getResponseBodyAsByteArray()
Return the response body as a byte array.  | 
 String | 
getResponseBodyAsString()
Return the response body as a string.  | 
 HttpHeaders | 
getResponseHeaders()
Return the HTTP response headers.  | 
 HttpStatus | 
getStatusCode()
Return the HTTP status code.  | 
 String | 
getStatusText()
Return the HTTP status text.  | 
| Methods inherited from class org.springframework.core.NestedRuntimeException | 
|---|
contains, getMessage, getMostSpecificCause, getRootCause | 
| Methods inherited from class java.lang.Throwable | 
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
protected HttpStatusCodeException(HttpStatus statusCode)
HttpStatusCodeException based on an
 HttpStatus.
statusCode - the status code
protected HttpStatusCodeException(HttpStatus statusCode,
                                  String statusText)
HttpStatusCodeException based on an
 HttpStatus and status text.
statusCode - the status codestatusText - the status text
protected HttpStatusCodeException(HttpStatus statusCode,
                                  String statusText,
                                  byte[] responseBody,
                                  Charset responseCharset)
HttpStatusCodeException based on an
 HttpStatus, status text, and response body content.
statusCode - the status codestatusText - the status textresponseBody - the response body content, may be nullresponseCharset - the response body charset, may be null
protected HttpStatusCodeException(HttpStatus statusCode,
                                  String statusText,
                                  HttpHeaders responseHeaders,
                                  byte[] responseBody,
                                  Charset responseCharset)
HttpStatusCodeException based on an
 HttpStatus, status text, and response body content.
statusCode - the status codestatusText - the status textresponseHeaders - the response headers, may be nullresponseBody - the response body content, may be nullresponseCharset - the response body charset, may be null| Method Detail | 
|---|
public HttpStatus getStatusCode()
public String getStatusText()
public HttpHeaders getResponseHeaders()
public byte[] getResponseBodyAsByteArray()
public String getResponseBodyAsString()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||