クラス XmlEventDecoder
java.lang.ObjectSE
org.springframework.core.codec.AbstractDecoder<XMLEventSE>
org.springframework.http.codec.xml.XmlEventDecoder
- 実装されているすべてのインターフェース:
Decoder<XMLEventSE>
DataBuffer ストリームを XMLEventsSE のストリームにデコードします。次の XML があるとします。
<root>
<child>foo</child>
<child>bar</child>
</root>
このデコーダーは、次のイベントで Flux を生成します。StartDocumentSEStartElementSErootStartElementSEchildCharactersSEfooEndElementSEchildStartElementSEchildCharactersSEbarEndElementSEchildEndElementSEroot
このデコーダーはデフォルトでは登録されていませんが、デフォルトで登録されている他のデコーダーによって内部的に使用されます。
- 導入:
- 5.0
- 作成者:
- Arjen Poutsma, Sam Brannen
フィールドのサマリー
クラス org.springframework.core.codec.AbstractDecoder から継承されたフィールド
loggerコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明reactor.core.publisher.Flux<XMLEventSE>decode(Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, MapSE<StringSE, ObjectSE> hints) DataBuffer入力ストリームをTの Flux にデコードします。intconfiguredバイトカウント制限を返します。voidsetMaxInMemorySize(int byteCount) このデコーダーでバッファーできる最大バイト数を設定します。クラス org.springframework.core.codec.AbstractDecoder から継承されたメソッド
canDecode, decodeToMono, getDecodableMimeTypes, getLogger, setLoggerクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.core.codec.Decoder から継承されたメソッド
decode, getDecodableMimeTypes
コンストラクターの詳細
XmlEventDecoder
public XmlEventDecoder()
メソッドの詳細
setMaxInMemorySize
public void setMaxInMemorySize(int byteCount) このデコーダーでバッファーできる最大バイト数を設定します。これは、全体としてデコードするときの入力全体のサイズ、または Aalto XML を介して非同期解析を使用するときのサイズの 1 つで、最上位の XML ツリーのサイズです。制限を超えると、DataBufferLimitExceptionが発生します。デフォルトでは、これは 256K に設定されています。
- パラメーター:
byteCount- バッファリングする最大バイト数、または無制限の場合は -1- 導入:
- 5.1.11
getMaxInMemorySize
public int getMaxInMemorySize()configuredバイトカウント制限を返します。- 導入:
- 5.1.11
decode
public reactor.core.publisher.Flux<XMLEventSE> decode(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- デコード方法に関する追加情報- 戻り値:
- デコードされた要素を含む出力ストリーム