android-coroutines / nl.adaptivity.android.kryo

Package nl.adaptivity.android.kryo

Types

AndroidKotlinResolver

class AndroidKotlinResolver : DefaultClassResolver

KotlinObjectInstantiatorStrategy

class KotlinObjectInstantiatorStrategy : InstantiatorStrategy

KryoParcelable

class KryoParcelable<out T : Any> : Parcelable

A Parcelable that can be stored using Kryo. For now it is hardcoded to use the Kryo object created by kryoAndroid.

ParcelInput

class ParcelInput : Input

Input class that uses a parcel to serialize. Perhaps not sustainable and ByteArrayStreams are better.

ParcelOutput

class ParcelOutput : Output

Output class that uses a parcel to serialize. Perhaps not sustainable and ByteArrayStreams are better.

Extensions for External Classes

android.os.Parcel

com.esotericsoftware.kryo.Kryo

Properties

kryoAndroid

val kryoAndroid: Kryo

Get a Kryo serializer for a context-less application. For serialization this should not make a difference, but for deserialization any contexts present in the state will lead to failure.

Functions

kryoAndroid

fun kryoAndroid(context: Context): Kryo

Get a Kryo serializer that handles Android contexts special. It allows dynamic replacement of markers indicating a context with the passed in context (or application context if that applies).