public int serialize(int offset, byte[] data, EscherSerializationListener listener) {listener.beforeRecordSerialize( offset, getRecordId(), this );int pos = offset;LittleEndian.putShort( data, pos, getOptions() );     pos += 2;LittleEndian.putShort( data, pos, getRecordId() );    pos += 2;int remainingBytes = getRecordSize() - 8;LittleEndian.putInt( data, pos, remainingBytes );              pos += 4;LittleEndian.putInt( data, pos, field_1_shapeIdMax );          pos += 4;LittleEndian.putInt( data, pos, getNumIdClusters() );          pos += 4;LittleEndian.putInt( data, pos, field_3_numShapesSaved );      pos += 4;LittleEndian.putInt( data, pos, field_4_drawingsSaved );       pos += 4;for (FileIdCluster fic : field_5_fileIdClusters) {LittleEndian.putInt( data, pos, fic.getDrawingGroupId() );   pos += 4;LittleEndian.putInt( data, pos, fic.getNumShapeIdsUsed() );  pos += 4;}listener.afterRecordSerialize( pos, getRecordId(), getRecordSize(), this );return getRecordSize();}
public override int Serialize(int offset, byte[] data, EscherSerializationListener listener){listener.BeforeRecordSerialize(offset, RecordId, this);int pos = offset;LittleEndian.PutShort(data, pos, Options); pos += 2;LittleEndian.PutShort(data, pos, RecordId); pos += 2;int remainingBytes = RecordSize - 8;LittleEndian.PutInt(data, pos, remainingBytes); pos += 4;LittleEndian.PutInt(data, pos, field_1_shapeIdMax); pos += 4;LittleEndian.PutInt(data, pos, NumIdClusters); pos += 4;LittleEndian.PutInt(data, pos, field_3_numShapesSaved); pos += 4;LittleEndian.PutInt(data, pos, field_4_drawingsSaved); pos += 4;for (int i = 0; i < field_5_fileIdClusters.Length; i++){LittleEndian.PutInt(data, pos, field_5_fileIdClusters[i].DrawingGroupId); pos += 4;LittleEndian.PutInt(data, pos, field_5_fileIdClusters[i].NumShapeIdsUsed); pos += 4;}listener.AfterRecordSerialize(pos, RecordId, RecordSize, this);return RecordSize;}