Esempio n. 1
0
        /// <summary>
        /// Set the data associated with the stream object.
        /// </summary>
        /// <example>
        /// <code>
        ///    byte[] b = new byte[]{0x0,0x1,0x2,0x3};
        ///    CompoundFile cf = new CompoundFile();
        ///    CFStream myStream = cf.RootStorage.AddStream("MyStream");
        ///    myStream.SetData(b);
        /// </code>
        /// </example>
        /// <param name="data">Data bytes to write to this stream</param>
        /// <remarks>Existing associated data will be lost after method invocation</remarks>
        public void SetData(byte[] data)
        {
            CheckDisposed();

            CompoundFile.FreeData(this);
            CompoundFile.WriteData(this, data);
        }