クラス UnknownContentTypeException

実装されたすべてのインターフェース:
SerializableSE

public class UnknownContentTypeException extends RestClientException
レスポンスを抽出するための適切な HttpMessageConverter が見つからなかった場合に発生します。
導入:
5.2.7
作成者:
Rossen Stoyanchev
関連事項:
  • コンストラクターの詳細

    • UnknownContentTypeException

      public UnknownContentTypeException(TypeSE targetType, MediaType contentType, int statusCode, StringSE statusText, HttpHeaders responseHeaders, byte[] responseBody)
      指定されたレスポンスデータでの新しいインスタンスを構築します。
      パラメーター:
      targetType - 予想されるターゲット型
      contentType - レスポンスのコンテンツ型
      statusCode - 生のステータスコード値
      statusText - ステータステキスト
      responseHeaders - レスポンスヘッダー (null の場合があります)
      responseBody - レスポンス本文のコンテンツ (null の場合があります)
    • UnknownContentTypeException

      public UnknownContentTypeException(TypeSE targetType, MediaType contentType, HttpStatusCode statusCode, StringSE statusText, HttpHeaders responseHeaders, byte[] responseBody)
      指定されたレスポンスデータでの新しいインスタンスを構築します。
      パラメーター:
      targetType - 予想されるターゲット型
      contentType - レスポンスのコンテンツ型
      statusCode - 生のステータスコード値
      statusText - ステータステキスト
      responseHeaders - レスポンスヘッダー (null の場合があります)
      responseBody - レスポンス本文のコンテンツ (null の場合があります)
      導入:
      6.0
  • メソッドの詳細

    • getTargetType

      public TypeSE getTargetType()
      レスポンスに期待されるターゲット型を返します。
    • getContentType

      public MediaType getContentType()
      レスポンスのコンテンツ型、または "application/octet-stream" を返します。
    • getStatusCode

      public HttpStatusCode getStatusCode()
      HTTP ステータスコード値を返します。
    • getRawStatusCode

      @DeprecatedSE(since="6.0") public int getRawStatusCode()
      使用すべきではありません。
      6.0 現在、getStatusCode() を推奨
      生の HTTP ステータスコード値を返します。
    • getStatusText

      public StringSE getStatusText()
      HTTP ステータステキストを返します。
    • getResponseHeaders

      @Nullable public HttpHeaders getResponseHeaders()
      HTTP レスポンスヘッダーを返します。
    • getResponseBody

      public byte[] getResponseBody()
      レスポンス本文をバイト配列として返します。
    • getResponseBodyAsString

      public StringSE getResponseBodyAsString()
      それ以外の場合は、"Content-Type" レスポンスの文字セットを使用して文字列に変換されたレスポンス本文を返すか、"UTF-8" を返します。