クラス KotlinSerializationBinaryDecoder<T extends kotlinx.serialization.BinaryFormat>
java.lang.ObjectSE
org.springframework.http.codec.KotlinSerializationSupport<T>
org.springframework.http.codec.KotlinSerializationBinaryDecoder<T>
- 型パラメーター:
T
-BinaryFormat
の型
public abstract class KotlinSerializationBinaryDecoder<T extends kotlinx.serialization.BinaryFormat>
extends KotlinSerializationSupport<T>
implements Decoder<ObjectSE>
Kotlin バイナリシリアライザーに従う
Decoder
実装の抽象基本クラス。- 導入:
- 6.0
- 作成者:
- Sebastien Deleuze, Iain Henderson, Arjen Poutsma
コンストラクターのサマリー
コンストラクター方法の概要
修飾子と型メソッド説明boolean
canDecode
(ResolvableType elementType, MimeType mimeType) デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。reactor.core.publisher.Flux<ObjectSE>
decode
(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer
入力ストリームをT
の Flux にデコードします。reactor.core.publisher.Mono<ObjectSE>
decodeToMono
(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer
入力ストリームをT
の Mono にデコードします。このデコーダーでサポートされている MIME 型のリストを返します。getDecodableMimeTypes
(ResolvableType targetType) 指定された型の要素について、このデコーダーでサポートされている MIME 型のリストを返します。int
configured
バイトカウント制限を返します。void
setMaxInMemorySize
(int byteCount) 入力ストリームを集約する必要があるときはいつでもバッファリングできるバイト数の制限を構成します。クラス org.springframework.http.codec.KotlinSerializationSupport から継承されたメソッド
canSerialize, format, serializer, supportedMimeTypes
コンストラクターの詳細
KotlinSerializationBinaryDecoder
メソッドの詳細
setMaxInMemorySize
public void setMaxInMemorySize(int byteCount) 入力ストリームを集約する必要があるときに、バッファリングできるバイト数の制限を設定します。これは、単一のDataBuffer
、ByteBuffer
SE、byte[]
、Resource
、String
などにデコードした結果である可能性があります。また、入力ストリームを分割するときにも発生する可能性があります (たとえば、区切りテキスト)。この場合、制限は区切り文字の間にバッファリングされたデータに適用されます。デフォルトでは、これは 256K に設定されています。
- パラメーター:
byteCount
- バッファリングする最大バイト数、または無制限の場合は -1
getMaxInMemorySize
public int getMaxInMemorySize()configured
バイトカウント制限を返します。canDecode
インターフェースからコピーされた説明:Decoder
デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。getDecodableMimeTypes
インターフェースからコピーされた説明:Decoder
このデコーダーでサポートされている MIME 型のリストを返します。このリストは、考えられるすべてのターゲット要素型に適用されるとは限らないため、このメソッドの呼び出しは通常、canDecode(elementType, null)
を介して保護する必要があります。このリストでは、特定の要素型でのみサポートされている MIME 型を除外することもできます。または、Decoder.getDecodableMimeTypes(ResolvableType)
を使用してより正確なリストを作成します。- 次で指定:
- インターフェース
Decoder<T extends kotlinx.serialization.BinaryFormat>
のgetDecodableMimeTypes
- 戻り値:
- サポートされている MIME 型のリスト
getDecodableMimeTypes
インターフェースからコピーされた説明:Decoder
指定された型の要素について、このデコーダーでサポートされている MIME 型のリストを返します。このリストは、デコーダーが特定の要素型をサポートしていない場合、または MIME 型のサブセットに対してのみサポートしている場合、Decoder.getDecodableMimeTypes()
とは異なる場合があります。- 次で指定:
- インターフェース
Decoder<T extends kotlinx.serialization.BinaryFormat>
の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.BinaryFormat>
の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.BinaryFormat>
のdecodeToMono
- パラメーター:
inputStream
- デコードするDataBuffer
入力ストリームelementType
- 出力ストリーム内の要素の予想される型。この型は、事前にDecoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
メソッドに渡されている必要があり、true
を返している必要があります。mimeType
- 入力ストリームに関連付けられた MIME 型 (オプション)hints
- デコード方法に関する追加情報- 戻り値:
- デコードされた要素を持つ出力ストリーム