Class DIOSerializableObjectSerde

java.lang.Object
com.espertech.esper.common.internal.serde.serdeset.builtin.DIOSerializableObjectSerde
All Implemented Interfaces:
DataInputOutputSerde

public class DIOSerializableObjectSerde extends Object implements DataInputOutputSerde
Serde that serializes and de-serializes using ObjectInputStream and ObjectOutputStream.
  • Field Details

  • Method Details

    • write

      public void write(Object object, DataOutput output, byte[] pageFullKey, EventBeanCollatedWriter writer) throws IOException
      Description copied from interface: DataInputOutputSerde
      Write an object to the stream.
      Specified by:
      write in interface DataInputOutputSerde
      Parameters:
      object - to write or null if this is a nullable value
      output - to write to
      pageFullKey - the page key of the page containing the object, can be null if not relevant or not provided
      writer - the writer for events, can be null if not relevant or not provided
      Throws:
      IOException - for io exceptions
    • read

      public Object read(DataInput input, byte[] resourceKey) throws IOException
      Description copied from interface: DataInputOutputSerde
      Read an object from the stream.
      Specified by:
      read in interface DataInputOutputSerde
      Parameters:
      input - input to read
      resourceKey - the identifying key of the reader, can be null if not relevant or not provided
      Returns:
      object read or null if this is a nullable value
      Throws:
      IOException - for io exceptions
    • objectToByteArr

      public static byte[] objectToByteArr(Object underlying)
      Serialize object to byte array.
      Parameters:
      underlying - to serialize
      Returns:
      byte array
    • byteArrToObject

      public static Object byteArrToObject(byte[] bytes)
      Deserialize byte arry to object.
      Parameters:
      bytes - to read
      Returns:
      object
    • serializeTo

      public static void serializeTo(Object value, DataOutput output) throws IOException
      Serialize object
      Parameters:
      value - value to serialize
      output - output stream
      Throws:
      IOException - when a problem occurs
    • deserializeFrom

      public static Object deserializeFrom(DataInput input) throws IOException
      Deserialize object
      Parameters:
      input - input stream
      Returns:
      value
      Throws:
      IOException - when a problem occurs