<T> into an output
stream of bytes.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if supported, false otherwisethe type of elements in the source stream elementType, MimeType the MIME type for the output stream
(can be mimeType)null if not specified)Whether the encoder supports the given source element type and the MIME type for the output stream. |
| public Flux | Returns: the output streamthe input stream of Objects to encode. If the input should be
encoded as a single value rather than as a stream of elements, an instance of
inputStream, DataBufferFactory Mono should be used.for creating output stream bufferFactory, ResolvableType DataBuffer'sthe expected type of elements in the input stream;
this type must have been previously passed to the elementType, MimeType canEncode
method and it must have returned true.the MIME type for the output content (optional) mimeType, Map<String, Object> additional information about how to encode hints)Encode a stream of Objects of type |
| public default DataBuffer | Returns: the encoded contentthe value to be encoded value, DataBufferFactory for creating the output bufferFactory, ResolvableType DataBufferthe type for the value being encoded valueType, MimeType the MIME type for the output content (optional) mimeType, Map<String, Object> additional information about how to encode hints)Encode an Object of type T to a data buffer. |
| public List | Returns: the list of supported MIME typesReturn the list of MIME types supported by this Encoder. |
| public default List | Returns: the list of MIME types supported for the given element typethe type of element to check for encoding elementType)Return the list of MIME types supported by this Encoder for the given type of element. |
| canEncode | back to summary |
|---|---|
| public boolean canEncode(ResolvableType elementType, MimeType mimeType) Whether the encoder supports the given source element type and the MIME type for the output stream.
| |
| encode | back to summary |
|---|---|
| public Flux Encode a stream of Objects of type
| |
| encodeValue | back to summary |
|---|---|
| public default DataBuffer encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String, Object> hints) Encode an Object of type T to a data buffer. This is useful for scenarios, that distinct messages (or events) are encoded and handled individually, in fully aggregated form. By default this method raises
| |
| getEncodableMimeTypes | back to summary |
|---|---|
| public List Return the list of MIME types supported by this Encoder. The list may not
apply to every possible target element type and calls to this method should
typically be guarded via | |
| getEncodableMimeTypes | back to summary |
|---|---|
| public default List Return the list of MIME types supported by this Encoder for the given type
of element. This list may differ from the
| |