クラス KotlinSerializationStringDecoder<T extends kotlinx.serialization.StringFormat>

java.lang.ObjectSE
org.springframework.http.codec.KotlinSerializationSupport<T>
org.springframework.http.codec.KotlinSerializationStringDecoder<T>
型パラメーター:
T - StringFormat の型
実装されたすべてのインターフェース:
Decoder<ObjectSE>
既知の直属サブクラス
KotlinSerializationJsonDecoder

public abstract class KotlinSerializationStringDecoder<T extends kotlinx.serialization.StringFormat> extends KotlinSerializationSupport<T> implements Decoder<ObjectSE>
Kotlin 文字列シリアライザーに従う Decoder 実装の抽象基本クラス。
導入:
6.0
作成者:
Sebastien Deleuze, Iain Henderson, Arjen Poutsma
  • コンストラクターの詳細

    • KotlinSerializationStringDecoder

      public KotlinSerializationStringDecoder(T format, MimeType... supportedMimeTypes)
  • メソッドの詳細

    • setMaxInMemorySize

      public void setMaxInMemorySize(int byteCount)
      入力ストリームを集約する必要があるときはいつでもバッファリングできるバイト数の制限を構成します。これは、単一の DataBufferByteBufferSEbyte[]ResourceString などへのデコードの結果である可能性があります。区切りテキスト。この場合、制限は区切り文字間でバッファリングされるデータに適用されます。

      デフォルトでは、これは 256K に設定されています。

      パラメーター:
      byteCount - バッファリングする最大バイト数、または無制限の場合は -1
    • getMaxInMemorySize

      public int getMaxInMemorySize()
      configured バイトカウント制限を返します。
    • canDecode

      public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
      インターフェースからコピーされた説明: Decoder
      デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。
      次で指定:
      インターフェース Decoder<T extends kotlinx.serialization.StringFormat>canDecode 
      パラメーター:
      elementType - 出力ストリームのターゲット要素型
      mimeType - デコードするストリームに関連付けられた MIME 型 (指定しない場合は null にすることができます)
      戻り値:
      サポートされている場合は true、サポートされていない場合は false 
    • getDecodableMimeTypes

      public ListSE<MimeType> getDecodableMimeTypes()
      インターフェースからコピーされた説明: Decoder
      このデコーダーでサポートされている MIME 型のリストを返します。このリストは、考えられるすべてのターゲット要素型に適用されるとは限らないため、このメソッドの呼び出しは通常、canDecode(elementType, null) を介して保護する必要があります。このリストでは、特定の要素型でのみサポートされている MIME 型を除外することもできます。または、Decoder.getDecodableMimeTypes(ResolvableType) を使用してより正確なリストを作成します。
      次で指定:
      インターフェース Decoder<T extends kotlinx.serialization.StringFormat>getDecodableMimeTypes 
      戻り値:
      サポートされている MIME 型のリスト
    • getDecodableMimeTypes

      public ListSE<MimeType> getDecodableMimeTypes(ResolvableType targetType)
      インターフェースからコピーされた説明: Decoder
      指定された型の要素について、このデコーダーでサポートされている MIME 型のリストを返します。このリストは、デコーダーが特定の要素型をサポートしていない場合、または MIME 型のサブセットに対してのみサポートしている場合、Decoder.getDecodableMimeTypes() とは異なる場合があります。
      次で指定:
      インターフェース Decoder<T extends kotlinx.serialization.StringFormat>getDecodableMimeTypes 
      パラメーター:
      targetType - デコードをチェックする要素の型
      戻り値:
      特定のターゲット型でサポートされている MIME 型のリスト
    • decode

      public reactor.core.publisher.Flux<ObjectSE> decode(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
      インターフェースからコピーされた説明: Decoder
      DataBuffer 入力ストリームを T の Flux にデコードします。
      次で指定:
      インターフェース Decoder<T extends kotlinx.serialization.StringFormat>decode 
      パラメーター:
      inputStream - デコードする DataBuffer 入力ストリーム
      elementType - 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType) メソッドに渡されている必要があり、true を返している必要があります。
      mimeType - 入力ストリームに関連付けられた MIME 型 (オプション)
      hints - デコード方法に関する追加情報
      戻り値:
      デコードされた要素を含む出力ストリーム
    • decodeToMono

      public reactor.core.publisher.Mono<ObjectSE> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
      インターフェースからコピーされた説明: Decoder
      DataBuffer 入力ストリームを T の Mono にデコードします。
      次で指定:
      インターフェース Decoder<T extends kotlinx.serialization.StringFormat>decodeToMono 
      パラメーター:
      inputStream - デコードする DataBuffer 入力ストリーム
      elementType - 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType) メソッドに渡されている必要があり、true を返している必要があります。
      mimeType - 入力ストリームに関連付けられた MIME 型 (オプション)
      hints - デコード方法に関する追加情報
      戻り値:
      デコードされた要素を持つ出力ストリーム