|
|||||||||
| 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.
| Field Summary | |
|---|---|
private static java.nio.charset.Charset |
DEFAULT_CHARSET
|
private byte[] |
responseBody
|
private java.nio.charset.Charset |
responseCharset
|
private HttpStatus |
statusCode
|
private java.lang.String |
statusText
|
| Constructor Summary | |
|---|---|
protected |
HttpStatusCodeException(HttpStatus statusCode)
Construct a new instance of HttpStatusCodeException based on a HttpStatus. |
protected |
HttpStatusCodeException(HttpStatus statusCode,
java.lang.String statusText)
Construct a new instance of HttpStatusCodeException based on a HttpStatus and status text. |
protected |
HttpStatusCodeException(HttpStatus statusCode,
java.lang.String statusText,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of HttpStatusCodeException based on a HttpStatus, status text, and
response body content. |
| Method Summary | |
|---|---|
byte[] |
getResponseBodyAsByteArray()
Returns the response body as a byte array. |
java.lang.String |
getResponseBodyAsString()
Returns the response body as a string. |
HttpStatus |
getStatusCode()
Returns the HTTP status code. |
java.lang.String |
getStatusText()
Returns 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 |
| Field Detail |
|---|
private static final java.nio.charset.Charset DEFAULT_CHARSET
private final HttpStatus statusCode
private final java.lang.String statusText
private final byte[] responseBody
private final java.nio.charset.Charset responseCharset
| Constructor Detail |
|---|
protected HttpStatusCodeException(HttpStatus statusCode)
HttpStatusCodeException based on a HttpStatus.
statusCode - the status code
protected HttpStatusCodeException(HttpStatus statusCode,
java.lang.String statusText)
HttpStatusCodeException based on a HttpStatus and status text.
statusCode - the status codestatusText - the status text
protected HttpStatusCodeException(HttpStatus statusCode,
java.lang.String statusText,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
HttpStatusCodeException based on a 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| Method Detail |
|---|
public HttpStatus getStatusCode()
public java.lang.String getStatusText()
public byte[] getResponseBodyAsByteArray()
public java.lang.String getResponseBodyAsString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||