クラス StringDecoder
java.lang.ObjectSE
org.springframework.core.codec.AbstractDecoder<T>
org.springframework.core.codec.AbstractDataBufferDecoder<T>
org.springframework.core.codec.AbstractCharSequenceDecoder<StringSE>
org.springframework.core.codec.StringDecoder
データバッファストリームから
String
ストリームにデコードし、受信データチャンクを分割または集約して、改行区切り記号に沿って再配置し、文字列のストリームを生成します。これはストリーミングに役立ちますが、分割文字の課題を回避して、マルチバイト文字を正しくデコードできるようにするためにも必要です。デフォルトで使用されるデフォルトの区切り文字は \n
と \r\n
ですが、カスタマイズ可能です。- 導入:
- 5.0
- 作成者:
- Sebastien Deleuze, Brian Clozel, Arjen Poutsma, Mark Paluch
- 関連事項:
フィールドサマリー
クラス org.springframework.core.codec.AbstractCharSequenceDecoder から継承されたフィールド
DEFAULT_CHARSET, DEFAULT_DELIMITERS
クラス org.springframework.core.codec.AbstractDecoder から継承されたフィールド
logger
メソッドのサマリー
修飾子と型メソッド説明static StringDecoder
すべての MIME 型をサポートするStringDecoder
を作成します。static StringDecoder
allMimeTypes
(ListSE<StringSE> delimiters, boolean stripDelimiter) すべての MIME 型をサポートするStringDecoder
を作成します。boolean
canDecode
(ResolvableType elementType, MimeType mimeType) デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。protected StringSE
decodeInternal
(DataBuffer dataBuffer, CharsetSE charset) 指定された文字セットを使用して、指定されたデータバッファーをT
にデコードするテンプレートメソッド。static StringDecoder
"text/plain"
のStringDecoder
を作成します。static StringDecoder
textPlainOnly
(ListSE<StringSE> delimiters, boolean stripDelimiter) "text/plain"
のStringDecoder
を作成します。クラス org.springframework.core.codec.AbstractCharSequenceDecoder から継承されたメソッド
decode, decode, getDefaultCharset, setDefaultCharset
クラス org.springframework.core.codec.AbstractDataBufferDecoder から継承されたメソッド
decodeDataBuffer, decodeToMono, getMaxInMemorySize, setMaxInMemorySize
クラス org.springframework.core.codec.AbstractDecoder から継承されたメソッド
getDecodableMimeTypes, getLogger, setLogger
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.core.codec.Decoder から継承されたメソッド
getDecodableMimeTypes
メソッドの詳細
canDecode
インターフェースからコピーされた説明:Decoder
デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。decodeInternal
クラスからコピーされた説明:AbstractCharSequenceDecoder
指定された文字セットを使用して、指定されたデータバッファーをT
にデコードするテンプレートメソッド。- 次で指定:
- クラス
AbstractCharSequenceDecoder<StringSE>
のdecodeInternal
textPlainOnly
"text/plain"
のStringDecoder
を作成します。textPlainOnly
"text/plain"
のStringDecoder
を作成します。- パラメーター:
delimiters
- 入力ストリームを分割するために使用する区切り文字列stripDelimiter
- 結果の入力文字列から区切り文字を削除するかどうか
allMimeTypes
すべての MIME 型をサポートするStringDecoder
を作成します。allMimeTypes
すべての MIME 型をサポートするStringDecoder
を作成します。- パラメーター:
delimiters
- 入力ストリームを分割するために使用する区切り文字列stripDelimiter
- 結果の入力文字列から区切り文字を削除するかどうか