public class XmlEventDecoder extends AbstractDecoder<XMLEventSE>
DataBuffer
ストリームを XMLEvents
SE のストリームにデコードします。次の XML があるとします。
<root> <child>foo</child> <child>bar</child> </root>このデコーダーは、次のイベントで
Flux
を生成します。StartDocument
SEStartElement
SE root
StartElement
SE child
Characters
SE foo
EndElement
SE child
StartElement
SE child
Characters
SE bar
EndElement
SE child
EndElement
SE 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, setLogger
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
decode, getDecodableMimeTypes
public 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)
Decoder
DataBuffer
入力ストリームを T
の Flux にデコードします。input
- デコードする DataBuffer
入力ストリーム elementType
- 出力ストリーム内の要素の予想される型。この型は、事前に Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
メソッドに渡されている必要があり、true
を返している必要があります。mimeType
- 入力ストリームに関連付けられた MIME 型 (オプション)hints
- デコード方法に関する追加情報