Class KryoPayloadReader

java.lang.Object
dev.getelements.elements.rt.kryo.KryoPayloadReader
All Implemented Interfaces:
PayloadReader

public class KryoPayloadReader extends Object implements PayloadReader
  • Constructor Details

    • KryoPayloadReader

      public KryoPayloadReader()
  • Method Details

    • convert

      public <T> T convert(Class<T> to, Object from)
      Description copied from interface: PayloadReader
      Reads the object to another type.
      Specified by:
      convert in interface PayloadReader
      Type Parameters:
      T - the type
      Parameters:
      to - the type to read
      from - the type from which to read
      Returns:
      an instance of the requested type, read from the supplied object.
    • read

      public <T> T read(Class<T> payloadType, InputStream stream) throws IOException
      Description copied from interface: PayloadReader
      Reads the actual response object to the InputStream.
      Specified by:
      read in interface PayloadReader
      Parameters:
      payloadType - the the response object
      stream - the output stream
      Throws:
      IOException