public class WebClientResponseException extends WebClientException
コンストラクターと説明 |
---|
WebClientResponseException(int statusCode, StringSE statusText, HttpHeaders headers, byte[] body, CharsetSE charset) レスポンスデータのみを含むコンストラクター、およびデフォルトメッセージ。 |
WebClientResponseException(int status, StringSE reasonPhrase, HttpHeaders headers, byte[] body, CharsetSE charset, HttpRequest request) レスポンスデータのみを含むコンストラクター、およびデフォルトメッセージ。 |
WebClientResponseException(StringSE message, int statusCode, StringSE statusText, HttpHeaders headers, byte[] responseBody, CharsetSE charset) 準備されたメッセージを持つコンストラクター。 |
WebClientResponseException(StringSE message, int statusCode, StringSE statusText, HttpHeaders headers, byte[] responseBody, CharsetSE charset, HttpRequest request) 準備されたメッセージを持つコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
static WebClientResponseException | create(int statusCode, StringSE statusText, HttpHeaders headers, byte[] body, CharsetSE charset) WebClientResponseException または HTTP ステータス固有のサブクラスを作成します。 |
static WebClientResponseException | create(int statusCode, StringSE statusText, HttpHeaders headers, byte[] body, CharsetSE charset, HttpRequest request) WebClientResponseException または HTTP ステータス固有のサブクラスを作成します。 |
HttpHeaders | getHeaders() HTTP レスポンスヘッダーを返します。 |
int | getRawStatusCode() 生の HTTP ステータスコード値を返します。 |
HttpRequest | getRequest() 対応するリクエストを返します。 |
byte[] | getResponseBodyAsByteArray() レスポンス本文をバイト配列として返します。 |
StringSE | getResponseBodyAsString() レスポンス本文を文字列として返します。 |
HttpStatus | getStatusCode() HTTP ステータスコード値を返します。 |
StringSE | getStatusText() HTTP ステータステキストを返します。 |
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressedSE, fillInStackTraceSE, getCauseSE, getLocalizedMessageSE, getStackTraceSE, getSuppressedSE, initCauseSE, printStackTraceSE, printStackTraceSE, printStackTraceSE, setStackTraceSE, toStringSE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public WebClientResponseException(int statusCode, StringSE statusText, @Nullable HttpHeaders headers, @Nullable byte[] body, @Nullable CharsetSE charset)
public WebClientResponseException(int status, StringSE reasonPhrase, @Nullable HttpHeaders headers, @Nullable byte[] body, @Nullable CharsetSE charset, @Nullable HttpRequest request)
public WebClientResponseException(StringSE message, int statusCode, StringSE statusText, @Nullable HttpHeaders headers, @Nullable byte[] responseBody, @Nullable CharsetSE charset)
public WebClientResponseException(StringSE message, int statusCode, StringSE statusText, @Nullable HttpHeaders headers, @Nullable byte[] responseBody, @Nullable CharsetSE charset, @Nullable HttpRequest request)
public HttpStatus getStatusCode()
IllegalArgumentExceptionSE
- 不明な HTTP ステータスコードの場合 public int getRawStatusCode()
public StringSE getStatusText()
public HttpHeaders getHeaders()
public byte[] getResponseBodyAsByteArray()
public StringSE getResponseBodyAsString()
@Nullable public HttpRequest getRequest()
public static WebClientResponseException create(int statusCode, StringSE statusText, HttpHeaders headers, byte[] body, @Nullable CharsetSE charset)
WebClientResponseException
または HTTP ステータス固有のサブクラスを作成します。public static WebClientResponseException create(int statusCode, StringSE statusText, HttpHeaders headers, byte[] body, @Nullable CharsetSE charset, @Nullable HttpRequest request)
WebClientResponseException
または HTTP ステータス固有のサブクラスを作成します。