Interface ElsaSerializer

All Known Implementing Classes:
ElsaSerializerBase, ElsaSerializerPojo

public interface ElsaSerializer
Elsa serializer and deserializer. It turns object instance into binary form and vice versa.
  • Method Summary

    Modifier and Type
    Method
    Description
    <E> E
    clone(E obj)
    Deep binary clone.
    <E> E
    Reads binary data from input and converts them into object instances.
    void
    serialize(DataOutput output, Object obj)
    Converts object instance into binary form
  • Method Details

    • serialize

      void serialize(DataOutput output, Object obj) throws IOException
      Converts object instance into binary form
      Parameters:
      output - output into which binary data will be written while object is serialized
      obj - object instance to be serialized
      Throws:
      IOException - an exception from underlying stream
    • deserialize

      <E> E deserialize(DataInput input) throws IOException
      Reads binary data from input and converts them into object instances.
      Type Parameters:
      E - type of deserialized object
      Parameters:
      input - input to read data from
      Returns:
      deserialized object
      Throws:
      IOException - an exception from underlying stream
    • clone

      <E> E clone(E obj) throws IOException
      Deep binary clone. Serialize object into binary form, and then use data to deserialize it. Returned object should be equal to original, but is completely different instance.
      Type Parameters:
      E - type of cloned object
      Parameters:
      obj - object instance to be cloned
      Returns:
      deep clone
      Throws:
      IOException - an exception from underlying stream