From d51005fbbeaf6e84f94a2f9d491d705119898572 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Thu, 8 Sep 2016 13:24:05 +0200 Subject: [PATCH] Improve Encoder Javadoc --- .../main/java/org/springframework/core/codec/Encoder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/codec/Encoder.java b/spring-core/src/main/java/org/springframework/core/codec/Encoder.java index 170bedcf41..6aa2661e57 100644 --- a/spring-core/src/main/java/org/springframework/core/codec/Encoder.java +++ b/spring-core/src/main/java/org/springframework/core/codec/Encoder.java @@ -20,6 +20,7 @@ import java.util.List; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; @@ -50,7 +51,9 @@ public interface Encoder { /** * Encode a stream of Objects of type {@code T} into a {@link DataBuffer} * output stream. - * @param inputStream the input stream of Objects to encode + * @param inputStream the 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 + * {@link Mono} should be used. * @param bufferFactory for creating output stream {@code DataBuffer}'s * @param elementType the expected type of elements in the input stream; * this type must have been previously passed to the {@link #canEncode} -- GitLab