public class RestClientResponseException extends RestClientException
コンストラクターと説明 |
---|
RestClientResponseException(StringSE message, int statusCode, StringSE statusText, HttpHeaders responseHeaders, byte[] responseBody, CharsetSE responseCharset) 指定されたレスポンスデータでの新しいインスタンスを構築します。 |
修飾子と型 | メソッドと説明 |
---|---|
int | getRawStatusCode() 生の HTTP ステータスコード値を返します。 |
byte[] | getResponseBodyAsByteArray() レスポンス本文をバイト配列として返します。 |
StringSE | getResponseBodyAsString() レスポンス本文を文字列に変換して返します。 |
StringSE | getResponseBodyAsString(CharsetSE fallbackCharset) レスポンス本文を文字列に変換して返します。 |
HttpHeaders | getResponseHeaders() 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 RestClientResponseException(StringSE message, int statusCode, StringSE statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable CharsetSE responseCharset)
statusCode
- 生のステータスコード値 statusText
- ステータステキスト responseHeaders
- レスポンスヘッダー (null
の場合があります)responseBody
- レスポンス本文のコンテンツ (null
の場合があります)responseCharset
- レスポンス本体の文字セット (null
の場合があります)public int getRawStatusCode()
public StringSE getStatusText()
@Nullable public HttpHeaders getResponseHeaders()
public byte[] getResponseBodyAsByteArray()
public StringSE getResponseBodyAsString()
"UTF-8"
の文字セットです。