Package ej.sp
Interface SPReader
-
public interface SPReaderTheSPReaderinterface provides a method for reconstructing objects from a block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectreadObject(ShieldedPlug sp, int blockID)Reads and returns an object from a block of the givenShieldedPlug.
-
-
-
Method Detail
-
readObject
Object readObject(ShieldedPlug sp, int blockID) throws EmptyBlockException
Reads and returns an object from a block of the givenShieldedPlug. The class implementing this interface defines how the object is "read".- Parameters:
sp- theShieldedPlugfrom which data is readblockID- the ID of the block- Returns:
- the object read from the
ShieldedPlug - Throws:
IllegalArgumentException- if no block is defined with the given IDIndexOutOfBoundsException- if the block length is lower than the size needed for object de-serializationEmptyBlockException- if no data is available in the block
-
-