diff --git a/spring-web/src/main/java/org/springframework/http/converter/ResourceHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/ResourceHttpMessageConverter.java index c19e136cd25..e4ee926c522 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/ResourceHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/ResourceHttpMessageConverter.java @@ -31,14 +31,13 @@ import org.springframework.util.ClassUtils; import org.springframework.util.StreamUtils; /** - * Implementation of {@link HttpMessageConverter} that can read and write {@link Resource Resources} + * Implementation of {@link HttpMessageConverter} that can read/write {@link Resource Resources} * and supports byte range requests. * *

By default, this converter can read all media types. The Java Activation Framework (JAF) - * if available - is used to determine the {@code Content-Type} of written resources. * If JAF is not available, {@code application/octet-stream} is used. * - * * @author Arjen Poutsma * @author Juergen Hoeller * @author Kazuki Shimizu @@ -51,6 +50,7 @@ public class ResourceHttpMessageConverter extends AbstractHttpMessageConverter clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { - if (supportsReadStreaming && InputStreamResource.class == clazz) { + if (this.supportsReadStreaming && InputStreamResource.class == clazz) { return new InputStreamResource(inputMessage.getBody()); } else if (clazz.isAssignableFrom(ByteArrayResource.class)) {