public int serialize(int offset, byte[] data){LittleEndian.putShort( data, 0 + offset, getSid() );LittleEndian.putShort( data, 2 + offset, (short) ( getRecordSize() - 4 ) );byte[] rawData = getRawData();if ( escherRecords.size() == 0 && rawData != null ){LittleEndian.putShort(data, 0 + offset, getSid());LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));System.arraycopy( rawData, 0, data, 4 + offset, rawData.length);return rawData.length + 4;}LittleEndian.putShort(data, 0 + offset, getSid());LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));int pos = offset + 4;for (EscherRecord r : escherRecords) {pos += r.serialize( pos, data, new NullEscherSerializationListener() );}return getRecordSize();}

public override int Serialize(int offset, byte[] data){LittleEndian.PutShort(data, 0 + offset, Sid);LittleEndian.PutShort(data, 2 + offset, (short)(RecordSize - 4));byte[] rawData = RawData;if (escherRecords.Count == 0 && rawData != null){LittleEndian.PutShort(data, 0 + offset, Sid);LittleEndian.PutShort(data, 2 + offset, (short)(RecordSize - 4));Array.Copy(rawData, 0, data, 4 + offset, rawData.Length);return rawData.Length + 4;}LittleEndian.PutShort(data, 0 + offset, Sid);LittleEndian.PutShort(data, 2 + offset, (short)(RecordSize - 4));int pos = offset + 4;foreach (EscherRecord r in escherRecords){pos += r.Serialize(pos, data, new NullEscherSerializationListener());}return RecordSize;}
