StringSerializer

abstract class StringSerializer(charset: Charset, nullLimited: Boolean) : PrimitiveSerializer<String?>

Abstract serializer for Strings.

For concrete implementations see StringSerializerAscii, StringSerializerUtf8 and StringSerializerUtf16

Constructors

Link copied to clipboard
fun StringSerializer(charset: Charset, nullLimited: Boolean)

Functions

Link copied to clipboard
open override fun deserialize(buffer: ByteBuffer, featureSet: FeatureSet): String?

Deserialize Quassel protocol data from a buffer

Link copied to clipboard
fun deserializeRaw(data: ByteBuffer?): String

Deserialize a string from a given byte slice

Link copied to clipboard
open override fun serialize(buffer: ChainedByteBuffer, data: String?, featureSet: FeatureSet)

Serialize data with the Quassel protocol to a buffer

Link copied to clipboard
fun serializeRaw(data: String?): ByteBuffer

Serialize a string, without length prefix, as a byte size

Properties

Link copied to clipboard
open override val javaType: Class<out String>

The underlying Java type this Serializer can (de-)serialize. Used for type-safe serializer autodiscovery.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard