int arraySize = getArraySize();
BytesOutputStream bytes =
new BytesOutputStream(result, arraySize);
STypeOutputStream output = new STypeOutputStream(bytes);
result.write(ControlBlock.LIST_BEGIN);
Object block;
while ((block = data.read()) != ControlBlock.NO_MORE_DATA)
{
serialise(data, output, block);
}
output.close();
result.write(ControlBlock.LIST_END);
}
catch (IOException e)
{
throw new ActivityProcessingException(e);