Class KryoShimServiceLoader

  • public class KryoShimServiceLoader
    extends Object
    Loads the highest-priority or user-selected KryoShimService.
    • Constructor Detail

      • KryoShimServiceLoader

        public KryoShimServiceLoader()
    • Method Detail

      • applyConfiguration

        public static void applyConfiguration​(org.apache.commons.configuration2.Configuration configuration)
      • close

        public static void close()
      • writeClassAndObjectToBytes

        public static byte[] writeClassAndObjectToBytes​(Object object)
        A loose abstraction of Kryo.writeClassAndObject(, java.lang.Object), where the output parameter is an internally-created ByteArrayOutputStream. Returns the byte array underlying that stream.
        object - an object for which the instance and class are serialized
        the serialized form
      • readClassAndObject

        public static <T> T readClassAndObject​(InputStream inputStream)
        A loose abstraction of Kryo.readClassAndObject(, where the input parameter is source. Returns the deserialized object.
        Type Parameters:
        T - the type to which the deserialized object is cast as it is returned
        inputStream - an input stream containing data for a serialized object class and instance
        the deserialized object