open class BufferedImageHttpMessageConverter : HttpMessageConverter<BufferedImage>
Implementation of HttpMessageConverter that can read and write BufferedImage.
By default, this converter can read all media types that are supported by the registered image readers, and writes using the media type of the first available registered image writer. The latter can be overridden by setting the defaultContentType property.
If the cacheDir property is set, this converter will cache image data.
The #process(ImageReadParam) and #process(ImageWriteParam) template methods allow subclasses to override Image I/O parameters.
Author
Arjen Poutsma
Since
3.0
BufferedImageHttpMessageConverter() |
open fun canRead(clazz: Class<*>, mediaType: MediaType): Boolean |
|
open fun canWrite(clazz: Class<*>, mediaType: MediaType): Boolean |
|
open fun getDefaultContentType(): MediaType
Returns the default |
|
open fun getSupportedMediaTypes(): MutableList<MediaType> |
|
open fun read(clazz: Class<out BufferedImage>, inputMessage: HttpInputMessage): BufferedImage |
|
open fun setCacheDir(cacheDir: File): Unit
Sets the cache directory. If this property is set to an existing directory, this converter will cache image data. |
|
open fun setDefaultContentType(defaultContentType: MediaType): Unit
Sets the default |
|
open fun write(image: BufferedImage, contentType: MediaType, outputMessage: HttpOutputMessage): Unit |