T
- 要素型 public abstract class AbstractDataBufferDecoder<T> extends AbstractDecoder<T>
DataBuffer
をターゲット要素型に直接デコードできる Decoder
実装の抽象基本クラス。 サブクラスは decodeDataBuffer(org.springframework.core.io.buffer.DataBuffer, org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.util.Map<java.lang.String, java.lang.Object>)
を実装して、DataBuffer
をターゲットのデータ型に変換する方法を提供する必要があります。デフォルトの decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>, org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.util.Map<java.lang.String, java.lang.Object>)
実装は個々のデータバッファーを変換し、decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>, org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.util.Map<java.lang.String, java.lang.Object>)
は「削減」を適用して集約バッファーを変換します。
サブクラスは、decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer>, org.springframework.core.ResolvableType, org.springframework.util.MimeType, java.util.Map<java.lang.String, java.lang.Object>)
をオーバーライドして、入力ストリームを異なる境界に沿って分割したり(たとえば、String
の改行文字で)、常に単一のデータバッファー(Resource
など)に削減したりできます。
logger
修飾子 | コンストラクターと説明 |
---|---|
protected | AbstractDataBufferDecoder(MimeType... supportedMimeTypes) |
修飾子と型 | メソッドと説明 |
---|---|
reactor.core.publisher.Flux<T> | decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer 入力ストリームを T の Flux にデコードします。 |
protected T | decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) 使用すべきではありません。 5.2 現在、代わりに Decoder.decode(DataBuffer, ResolvableType, MimeType, Map) を実装してください |
reactor.core.publisher.Mono<T> | decodeToMono(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer 入力ストリームを T の Mono にデコードします。 |
int | getMaxInMemorySize() configured バイトカウント制限を返します。 |
void | setMaxInMemorySize(int byteCount) 入力ストリームを集約する必要があるときはいつでもバッファリングできるバイト数の制限を構成します。 |
canDecode, getDecodableMimeTypes, getLogger, setLogger
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
decode, getDecodableMimeTypes
protected AbstractDataBufferDecoder(MimeType... supportedMimeTypes)
public void setMaxInMemorySize(int byteCount)
DataBuffer
、ByteBuffer
SE、byte[]
、Resource
、String
などへのデコードの結果である可能性があります。区切りテキスト。この場合、制限は区切り文字間でバッファリングされるデータに適用されます。デフォルトでは、これは 256K に設定されています。
byteCount
- バッファリングする最大バイト数、または無制限の場合は -1public int getMaxInMemorySize()
configured
バイトカウント制限を返します。public reactor.core.publisher.Flux<T> decode(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
Decoder
DataBuffer
入力ストリームを T
の Flux にデコードします。input
- デコードする DataBuffer
入力ストリーム elementType
- 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
メソッドに渡されている必要があり、true
を返している必要があります。mimeType
- 入力ストリームに関連付けられた MIME 型 (オプション)hints
- デコード方法に関する追加情報 public reactor.core.publisher.Mono<T> decodeToMono(Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
Decoder
DataBuffer
入力ストリームを T
の Mono にデコードします。Decoder<T>
の decodeToMono
AbstractDecoder<T>
の decodeToMono
input
- デコードする DataBuffer
入力ストリーム elementType
- 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
メソッドに渡されている必要があり、true
を返している必要があります。mimeType
- 入力ストリームに関連付けられた MIME 型 (オプション)hints
- デコード方法に関する追加情報 @DeprecatedSE @Nullable protected T decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
Decoder.decode(DataBuffer, ResolvableType, MimeType, Map)
を実装してください DataBuffer
をターゲット要素型にデコードする方法。