Package ej.sp

Interface SPWriter


  • public interface SPWriter
    The SPWriter interface provides a method for serializing objects into a block.
    • Method Detail

      • writeObject

        void writeObject​(ShieldedPlug sp,
                         int blockID,
                         Object o)
        Writes an object into a block of the given ShieldedPlug. The class implementing this interface defines how the object is written.
        Parameters:
        sp - the ShieldedPlug into which data is written
        blockID - ID of the block
        o - the object to be written
        Throws:
        IllegalArgumentException - if no block is defined with the given ID
        IndexOutOfBoundsException - if the block length is lower than the size needed for object serialization