public class XmlEventDecoder extends AbstractDecoder<XMLEventSE>
DataBuffer ストリームを XMLEventsSE のストリームにデコードします。次の XML があるとします。
<root>
<child>foo</child>
<child>bar</child>
</root>
このデコーダーは、次のイベントで Flux を生成します。StartDocumentSEStartElementSE rootStartElementSE childCharactersSE fooEndElementSE childStartElementSE childCharactersSE barEndElementSE childEndElementSE rootこのデコーダーはデフォルトでは登録されていませんが、デフォルトで登録されている他のデコーダーによって内部的に使用されます。
logger| コンストラクターと説明 |
|---|
XmlEventDecoder() |
| 修飾子と型 | メソッドと説明 |
|---|---|
reactor.core.publisher.Flux<XMLEventSE> | decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints)DataBuffer 入力ストリームを T の Flux にデコードします。 |
int | getMaxInMemorySize()configured バイトカウント制限を返します。 |
void | setMaxInMemorySize(int byteCount) このデコーダーでバッファーできる最大バイト数を設定します。 |
canDecode, decodeToMono, getDecodableMimeTypes, getLogger, setLoggercloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic void setMaxInMemorySize(int byteCount)
DataBufferLimitException が発生します。デフォルトでは、これは 256K に設定されています。
byteCount - バッファリングする最大バイト数、または無制限の場合は -1public int getMaxInMemorySize()
configured バイトカウント制限を返します。public reactor.core.publisher.Flux<XMLEventSE> decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable MapSE<StringSE,ObjectSE> hints)
DecoderDataBuffer 入力ストリームを T の Flux にデコードします。input - デコードする DataBuffer 入力ストリーム elementType - 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType) メソッドに渡されている必要があり、true を返している必要があります。mimeType - 入力ストリームに関連付けられた MIME 型 (オプション)hints - エンコード方法に関する追加情報