T
- the type of elements in the output streampublic interface Decoder<T>
DataBuffer
input stream into an output stream
of elements of type <T>
.Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(ResolvableType elementType,
MimeType mimeType)
Whether the decoder supports the given target element type and the MIME
type of the source stream.
|
<any> |
decode(<any> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Decode a
DataBuffer input stream into a Flux of T . |
<any> |
decodeToMono(<any> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Decode a
DataBuffer input stream into a Mono of T . |
java.util.List<MimeType> |
getDecodableMimeTypes()
Return the list of MIME types this decoder supports.
|
boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
elementType
- the target element type for the output streammimeType
- the mime type associated with the stream to decode
(can be null
if not specified)true
if supported, false
otherwise<any> decode(<any> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable java.util.Map<java.lang.String,java.lang.Object> hints)
DataBuffer
input stream into a Flux of T
.inputStream
- the DataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream;
this type must have been previously passed to the canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream (optional)hints
- additional information about how to do encode<any> decodeToMono(<any> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable java.util.Map<java.lang.String,java.lang.Object> hints)
DataBuffer
input stream into a Mono of T
.inputStream
- the DataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream;
this type must have been previously passed to the canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream (optional)hints
- additional information about how to do encodejava.util.List<MimeType> getDecodableMimeTypes()