Class KotlinSerializationBinaryHttpMessageConverter<T extends kotlinx.serialization.BinaryFormat>
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.AbstractGenericHttpMessageConverter<Object>
org.springframework.http.converter.AbstractKotlinSerializationHttpMessageConverter<T>
org.springframework.http.converter.KotlinSerializationBinaryHttpMessageConverter<T>
- Type Parameters:
T
- the type ofBinaryFormat
- All Implemented Interfaces:
GenericHttpMessageConverter<Object>
,HttpMessageConverter<Object>
- Direct Known Subclasses:
KotlinSerializationCborHttpMessageConverter
,KotlinSerializationProtobufHttpMessageConverter
public abstract class KotlinSerializationBinaryHttpMessageConverter<T extends kotlinx.serialization.BinaryFormat>
extends AbstractKotlinSerializationHttpMessageConverter<T>
Abstract base class for
HttpMessageConverter
implementations that
defer to Kotlin binary 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
ModifierConstructorDescriptionprotected
KotlinSerializationBinaryHttpMessageConverter
(T format, MediaType... supportedMediaTypes) Construct anKotlinSerializationBinaryHttpMessageConverter
with format and supported media types. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, read, readInternal, supports, supportsRepeatableWrites, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractGenericHttpMessageConverter
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
canRead, canWrite, getSupportedMediaTypes, getSupportedMediaTypes, read, write
-
Constructor Details
-
KotlinSerializationBinaryHttpMessageConverter
Construct anKotlinSerializationBinaryHttpMessageConverter
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 classAbstractKotlinSerializationHttpMessageConverter<T extends kotlinx.serialization.BinaryFormat>
- 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 classAbstractKotlinSerializationHttpMessageConverter<T extends kotlinx.serialization.BinaryFormat>
- Throws:
IOException
HttpMessageNotWritableException
-