类 CharBufferDecoder
java.lang.Object
cn.taketoday.core.codec.AbstractDecoder<T>
cn.taketoday.core.codec.AbstractDataBufferDecoder<T>
cn.taketoday.core.codec.AbstractCharSequenceDecoder<CharBuffer>
cn.taketoday.core.codec.CharBufferDecoder
- 所有已实现的接口:
Decoder<CharBuffer>
Decode from a data buffer stream to a
CharBuffer stream, either splitting
or aggregating incoming data chunks to realign along newlines delimiters
and produce a stream of char buffers. This is useful for streaming but is also
necessary to ensure that multi-byte characters can be decoded correctly,
avoiding split-character issues. The default delimiters used by default are
\n and \r\n but that can be customized.- 从以下版本开始:
- 4.0
- 作者:
- Markus Heiden, Arjen Poutsma, Harry Yang
- 另请参阅:
-
字段概要
从类继承的字段 cn.taketoday.core.codec.AbstractCharSequenceDecoder
DEFAULT_CHARSET, DEFAULT_DELIMITERS从类继承的字段 cn.taketoday.core.codec.AbstractDecoder
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static CharBufferDecoderCreate aCharBufferDecoderthat supports all MIME types.static CharBufferDecoderallMimeTypes(List<String> delimiters, boolean stripDelimiter) Create aCharBufferDecoderthat supports all MIME types.booleancanDecode(ResolvableType elementType, MimeType mimeType) Whether the decoder supports the given target element type and the MIME type of the source stream.protected CharBufferdecodeInternal(DataBuffer dataBuffer, Charset charset) Template method that decodes the given data buffer intoT, given the charset.static CharBufferDecoderCreate aCharBufferDecoderfor"text/plain".static CharBufferDecodertextPlainOnly(List<String> delimiters, boolean stripDelimiter) Create aCharBufferDecoderfor"text/plain".从类继承的方法 cn.taketoday.core.codec.AbstractCharSequenceDecoder
decode, decode, getDefaultCharset, setDefaultCharset从类继承的方法 cn.taketoday.core.codec.AbstractDataBufferDecoder
decodeToMono, getMaxInMemorySize, setMaxInMemorySize从类继承的方法 cn.taketoday.core.codec.AbstractDecoder
getDecodableMimeTypes, getLogger, setLogger从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.core.codec.Decoder
getDecodableMimeTypes
-
构造器详细资料
-
CharBufferDecoder
-
-
方法详细资料
-
canDecode
从接口复制的说明:DecoderWhether the decoder supports the given target element type and the MIME type of the source stream.- 指定者:
canDecode在接口中Decoder<CharBuffer>- 覆盖:
canDecode在类中AbstractDecoder<CharBuffer>- 参数:
elementType- the target element type for the output streammimeType- the mime type associated with the stream to decode (can benullif not specified)- 返回:
trueif supported,falseotherwise
-
decodeInternal
从类复制的说明:AbstractCharSequenceDecoderTemplate method that decodes the given data buffer intoT, given the charset. -
textPlainOnly
Create aCharBufferDecoderfor"text/plain". -
textPlainOnly
Create aCharBufferDecoderfor"text/plain".- 参数:
delimiters- delimiter strings to use to split the input streamstripDelimiter- whether to remove delimiters from the resulting input strings
-
allMimeTypes
Create aCharBufferDecoderthat supports all MIME types. -
allMimeTypes
Create aCharBufferDecoderthat supports all MIME types.- 参数:
delimiters- delimiter strings to use to split the input streamstripDelimiter- whether to remove delimiters from the resulting input strings
-