Top Description Constructors Methods
org.springframework.http.converter

public abstract Class KotlinSerializationStringHttpMessageConverter<T extends kotlinx.serialization.StringFormat>

extends AbstractKotlinSerializationHttpMessageConverter<T extends kotlinx.serialization.StringFormat>
Class Inheritance
Known Direct Subclasses
org.springframework.http.converter.json.KotlinSerializationJsonHttpMessageConverter
Type Parameters
<T>
the type of StringFormat
Imports
java.io.IOException, java.nio.charset.Charset, .StandardCharsets, kotlinx.serialization.KSerializer, kotlinx.serialization.SerializationException, kotlinx.serialization.StringFormat, org.springframework.http.HttpInputMessage, .HttpOutputMessage, .MediaType, org.springframework.lang.Nullable, org.springframework.util.StreamUtils

Abstract base class for HttpMessageConverter implementations that defer to Kotlin string serializers.
Authors
Andreas Ahlenstorf, Sebastien Deleuze, Juergen Hoeller, Iain Henderson, Arjen Poutsma
Since
6.0

Constructor Summary

AccessConstructor and Description
protected
KotlinSerializationStringHttpMessageConverter(T format, MediaType... supportedMediaTypes)

Construct an KotlinSerializationStringHttpMessageConverter with format and supported media types.

Method Summary

Modifier and TypeMethod and Description
private static Charset
charset(MediaType contentType)

protected Object
readInternal(kotlinx.serialization.KSerializer<Object> serializer, T format, HttpInputMessage inputMessage)

Implements abstract org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.readInternal.

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)

Implements abstract org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.writeInternal.

Write the given object to the output message with the given serializer and format.

Inherited from org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter:
canReadcanWritereadreadInternalsupportssupportsRepeatableWriteswriteInternal

Constructor Detail

KotlinSerializationStringHttpMessageConverterback to summary
protected KotlinSerializationStringHttpMessageConverter(T format, MediaType... supportedMediaTypes)

Construct an KotlinSerializationStringHttpMessageConverter with format and supported media types.

Method Detail

charsetback to summary
private static Charset charset(MediaType contentType)
readInternalback to summary
protected Object readInternal(kotlinx.serialization.KSerializer<Object> serializer, T format, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException

Implements abstract org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.readInternal.

Doc from org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.readInternal.

Reads the given input message with the given serializer and format.

Annotations
@Override
writeInternalback to summary
protected void writeInternal(Object object, kotlinx.serialization.KSerializer<Object> serializer, T format, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException

Implements abstract org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.writeInternal.

Doc from org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter.writeInternal.

Write the given object to the output message with the given serializer and format.

Annotations
@Override