public int serialize(int offset, byte[] data){byte[] rawData = getRawData();if (getEscherRecords().size() == 0 && rawData != null){return writeData( offset, data, rawData );}byte[] buffer = new byte[getRawDataSize()];int pos = 0;for ( Iterator<EscherRecord> iterator = getEscherRecords().iterator(); iterator.hasNext(); ){EscherRecord r = iterator.next();pos += r.serialize(pos, buffer, new NullEscherSerializationListener() );}return writeData( offset, data, buffer );}
public override int Serialize(int offset, byte [] data){byte[] rawData = RawData;if (EscherRecords.Count == 0 && rawData != null){return WriteData(offset, data, rawData);}else{byte[] buffer = new byte[RawDataSize];int pos = 0;for (IEnumerator iterator = EscherRecords.GetEnumerator(); iterator.MoveNext(); ){EscherRecord r = (EscherRecord)iterator.Current;pos += r.Serialize(pos, buffer, new NullEscherSerializationListener());}return WriteData(offset, data, buffer);}}