String stream, either splitting
or aggregating incoming data chunks to realign along newlines delimiters
and produce a stream of strings. 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.
CharSequenceEncoder
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static StringDecoder | |
| public static StringDecoder | allMimeTypes(List<String>
delimiter strings to use to split the input stream delimiters, boolean whether to remove delimiters from the resulting
input strings stripDelimiter)Create a |
| public boolean | canDecode(ResolvableType
the target element type for the output stream elementType, MimeType the mime type associated with the stream to decode
(can be mimeType)null if not specified)Overrides org. Implements org. |
| protected String | decodeInternal(DataBuffer dataBuffer, Charset charset)
Implements abstract org. T, given
the charset.
|
| public static StringDecoder | |
| public static StringDecoder | textPlainOnly(List<String>
delimiter strings to use to split the input stream delimiters, boolean whether to remove delimiters from the resulting
input strings stripDelimiter)Create a |
| StringDecoder | back to summary |
|---|---|
| private StringDecoder(List<String> delimiters, boolean stripDelimiter, MimeType... mimeTypes) | |
| allMimeTypes | back to summary |
|---|---|
| public static StringDecoder allMimeTypes() Create a | |
| allMimeTypes | back to summary |
|---|---|
| public static StringDecoder allMimeTypes(List<String> delimiters, boolean stripDelimiter) Create a | |
| canDecode | back to summary |
|---|---|
| public boolean canDecode(ResolvableType elementType, MimeType mimeType) Overrides org. Implements org. Doc from org. Whether the decoder supports the given target element type and the MIME type of the source stream.
| |
| decodeInternal | back to summary |
|---|---|
| protected String decodeInternal(DataBuffer dataBuffer, Charset charset) Implements abstract org. Doc from org. Template method that decodes the given data buffer into
| |
| textPlainOnly | back to summary |
|---|---|
| public static StringDecoder textPlainOnly() Create a | |
| textPlainOnly | back to summary |
|---|---|
| public static StringDecoder textPlainOnly(List<String> delimiters, boolean stripDelimiter) Create a | |