Package 

Class ScaleCodec

  • All Implemented Interfaces:

    
    public final class ScaleCodec<Data extends Object>
    
                        

    Scale coded that handles converting objects to ByteArray and back

    • Method Detail

      • fromScale

         final <T extends Any> T fromScale(Data data, KType type)

        This method deserializes object of given Kotlin type

        Parameters:
        data - data to be deserialized
        type - a type to deserialize to
      • fromScale

         final <T extends Any> T fromScale(Data data, KClass<T> type)

        This method deserializes object of given Kotlin class

        Parameters:
        data - data to be deserialized
        type - a type to deserialize to
      • toScale

         final <T extends Any> Data toScale(T obj, KType type)

        This method serializes object of given nonnull Kotlin type

        Parameters:
        obj - a generic object to be deserialized
        type - a type to deserialize to
      • toScale

         final <T extends Any> Data toScale(T obj, KClass<T> type)

        This method serializes object of given nonnull Kotlin class

        Parameters:
        obj - a generic object to be serialized