Interface ObjectSerialiser

All Known Implementing Classes:
JavaObjectSerialiser, KryoObjectSerialiser, XStreamObjectSerialiser

public interface ObjectSerialiser
Interface for classes capable of Serialising/deserialising objects.
  • Method Details

    • writeObject

      @NotNull @NotNull OutputStream writeObject(Object object, OutputStream outputStream) throws IOException
      Writes an object to the supplied stream. Returns a stream that should be used for subsequent calls, or closed if no longer needed. It may be the same stream or a wrapped stream.
      Throws:
      IOException
    • readObject

      Retreieves an object from a stream. Returns a stream and a desrialised object. The stream should be used for subsequent calls, or closed if no longer needed. It may be the same stream or a wrapped stream.
      Parameters:
      inputStream -
      Throws:
      IOException
      ClassNotFoundException
    • getTag

      int getTag()
      Returns an unique identifier for this object serialiser