Esempio n. 1
0
 /// <summary>
 /// Writes bytes to the stream
 /// </summary>
 /// <param name="buffer">byte array which contains the bytes to write</param>
 /// <param name="offset">offset where to write the bytes</param>
 /// <param name="count">number of bytes to write</param>
 public override void Write(byte[] buffer, int offset, int count)
 {
     if (fileStream == null)
     {
         throw new ObjectDisposedException("theStream");
     }
     if (offset != 0)
     {
         int    i  = (int)buffer.Length - offset;
         byte[] bs = new byte[i];
         Array.Copy(buffer, offset, bs, 0, i);
         fileStream.Write(bs, i, IntPtr.Zero);
         return;
     }
     fileStream.Write(buffer, count, IntPtr.Zero);
 }
Esempio n. 2
0
 public override void Write(byte[] buffer, int offset, int count)
 {
     _stm.Write(buffer, count, IntPtr.Zero);
 }