/// <summary>
        /// Adds a local checksum to the data.
        /// </summary>
        public void AddLocalCheckSum()
        {
            this.AssureSize(this.index + 2);

            FletcherChecksum.ControlBytes control = FletcherChecksum.GetControlBytes(this.serializedData, this.localCheckSumIndex, this.index);

            this.serializedData[this.index]     = control.First;
            this.serializedData[this.index + 1] = control.Second;
            this.index += 2;

            this.localCheckSumIndex = this.index;
        }
        /// <summary>
        /// Saves the serialized data.
        /// </summary>
        /// <param name="serializableData">The serializable data inteface object.</param>
        /// <param name="id">The identifier.</param>
        public void Save(ISerializableData serializableData, string id)
        {
            if (!this.isWriteable)
            {
                throw new InvalidOperationException("Container is readonly");
            }

            if (this.serializedData != null)
            {
                FletcherChecksum.ControlBytes control = FletcherChecksum.GetControlBytes(this.serializedData, 0, this.index);

                byte[] data = new byte[this.index + 2];
                if (this.index > 0)
                {
                    Buffer.BlockCopy(this.serializedData, 0, data, 0, this.index);
                }

                data[this.index]     = control.First;
                data[this.index + 1] = control.Second;

                Log.Debug(this, "Save", id, data.Length);
                serializableData.SaveData(id, data);
            }
        }