Package org.springframework.http.codec.protobuf

# Class KotlinSerializationProtobufEncoder

java.lang.Object
org.springframework.http.codec.KotlinSerializationSupport<T>
org.springframework.http.codec.KotlinSerializationBinaryEncoder<kotlinx.serialization.protobuf.ProtoBuf>
org.springframework.http.codec.protobuf.KotlinSerializationProtobufEncoder

All Implemented Interfaces:
  `org.springframework.core.codec.Encoder<Object>`

public class KotlinSerializationProtobufEncoder extends KotlinSerializationBinaryEncoder<kotlinx.serialization.protobuf.ProtoBuf>
Decode a byte stream into a Protocol Buffer and convert to Objects with kotlinx.serialization.

This decoder can be used to bind `@Serializable` Kotlin classes, open polymorphic serialization is not supported. It supports `application/x-protobuf`, `application/octet-stream`, and `application/vnd.google.protobuf`.

Decoding streams is not supported yet, see kotlinx.serialization/issues/1073 related issue.

Since:
  6.0
Author:
  Iain Henderson

## Constructor Summary

Constructors
Constructor
Description
`KotlinSerializationProtobufEncoder()`
`KotlinSerializationProtobufEncoder(kotlinx.serialization.protobuf.ProtoBuf protobuf)`

## Method Summary

### Methods inherited from class org.springframework.http.codec.KotlinSerializationBinaryEncoder

`canEncode, encode, encodeValue, getEncodableMimeTypes, getEncodableMimeTypes`

### Methods inherited from class org.springframework.http.codec.KotlinSerializationSupport

`canSerialize, format, serializer, supportedMimeTypes`

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

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

## Constructor Details

### KotlinSerializationProtobufEncoder

public KotlinSerializationProtobufEncoder()

### KotlinSerializationProtobufEncoder

public KotlinSerializationProtobufEncoder(kotlinx.serialization.protobuf.ProtoBuf protobuf)