public void read( final byte[] data )
throws SerializationException
{
final ByteArrayInputStream bais = new ByteArrayInputStream( data );
final SerializerInputStream in = new SerializerInputStream( bais );
in.readByte(); // skip version
id = in.readInt();
title = in.readString();
controller = in.readNullableString();
actions.removeAllElements();
int count = in.readInt();
if( count > 0 )
{
for( int i = 0; i < count; i++ )
{
final ActionDef action = new ActionDef();
action.read( in );
actions.addElement( action );
}
}
attachments.removeAllElements();
count = in.readInt();
if( count > 0 )
{
for( int i = 0; i < count; i++ )
{
final AttachmentDef attachment = new AttachmentDef();