spring-framework / org.springframework.http.converter / ByteArrayHttpMessageConverter

ByteArrayHttpMessageConverter

open class ByteArrayHttpMessageConverter : AbstractHttpMessageConverter<ByteArray>

Implementation of HttpMessageConverter that can read and write byte arrays.

By default, this converter supports all media types (&#42;&#47;&#42;), and writes with a Content-Type of application/octet-stream. This can be overridden by setting the supportedMediaTypes property.

Author
Arjen Poutsma

Author
Juergen Hoeller

Since
3.0

Constructors

<init>

ByteArrayHttpMessageConverter()

Create a new instance of the ByteArrayHttpMessageConverter.

Functions

readInternal

open fun readInternal(clazz: Class<out ByteArray>, inputMessage: HttpInputMessage): ByteArray

supports

open fun supports(clazz: Class<*>): Boolean