while (true)
{
Object block = input.read();
if (block instanceof ObjectInputStream)
{
ObjectInputStream obj = (ObjectInputStream) block;
ObjectSerialiser ser = mSerialisers.getSerialiser(obj.getType());
if (ser == null)
{
LOG.debug("No serialiser for type: " + obj.getType());
throw new ActivityProcessingException(
new MissingSerialiserException(obj.getType()));
}
ser.deserialise(obj.getInput(), result);
}
else
{
result.write(block);
}