Package org.springframework.http.converter

# Class KotlinSerializationStringHttpMessageConverter<T extends kotlinx.serialization.StringFormat>

java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<Object>
org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter<T>
org.springframework.http.converter.KotlinSerializationStringHttpMessageConverter<T>

Type Parameters:
  `T` - the type of `StringFormat`

All Implemented Interfaces:
  `HttpMessageConverter<Object>`, `SmartHttpMessageConverter<Object>`

Direct Known Subclasses:
  `KotlinSerializationJsonHttpMessageConverter`

public abstract class KotlinSerializationStringHttpMessageConverter<T extends kotlinx.serialization.StringFormat> extends AbstractKotlinSerializationHttpMessageConverter<T>
Abstract base class for `HttpMessageConverter` implementations that defer to Kotlin string serializers.

Since:
  6.0
Author:
  Andreas Ahlenstorf, Sebastien Deleuze, Juergen Hoeller, Iain Henderson, Arjen Poutsma

## Field Summary

### Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

`logger`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`KotlinSerializationStringHttpMessageConverter(T format, MediaType... supportedMediaTypes)`
Construct an `KotlinSerializationStringHttpMessageConverter` with format and supported media types.

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`readInternal(kotlinx.serialization.KSerializer<Object> serializer, T format, HttpInputMessage inputMessage)`
Reads the given input message with the given serializer and format.
`protected void`
`writeInternal(Object object, kotlinx.serialization.KSerializer<Object> serializer, T format, HttpOutputMessage outputMessage)`
Write the given object to the output message with the given serializer and format.

### Methods inherited from class org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter

`canRead, canWrite, getSupportedMediaTypes, read, supports, supportsRepeatableWrites, writeInternal`

### Methods inherited from class org.springframework.http.converter.AbstractSmartHttpMessageConverter

`readInternal, write, writeInternal`

### Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter

`addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.http.converter.HttpMessageConverter

`getSupportedMediaTypes`

### Methods inherited from interface org.springframework.http.converter.SmartHttpMessageConverter

`canRead, canWrite, read, write`

## Constructor Details

### KotlinSerializationStringHttpMessageConverter

protected KotlinSerializationStringHttpMessageConverter(T format, MediaType... supportedMediaTypes)
Construct an `KotlinSerializationStringHttpMessageConverter` with format and supported media types.

## Method Details

### readInternal

protected Object readInternal(kotlinx.serialization.KSerializer<Object> serializer, T format, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException
Description copied from class: `AbstractKotlinSerializationHttpMessageConverter`
Reads the given input message with the given serializer and format.

Specified by:
  `readInternal` in class `AbstractKotlinSerializationHttpMessageConverter<T extends kotlinx.serialization.StringFormat>`
Throws:
  `IOException`
  `HttpMessageNotReadableException`

### writeInternal

protected void writeInternal(Object object, kotlinx.serialization.KSerializer<Object> serializer, T format, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException
Description copied from class: `AbstractKotlinSerializationHttpMessageConverter`
Write the given object to the output message with the given serializer and format.

Specified by:
  `writeInternal` in class `AbstractKotlinSerializationHttpMessageConverter<T extends kotlinx.serialization.StringFormat>`
Throws:
  `IOException`
  `HttpMessageNotWritableException`