Пример #1
0
        private void ResetStreamTrail(byte[] data)
        {
            if (data.Length > 0)
            {
                // If this stream can seek then revert it back
                if (_stm.CanSeek)
                {
                    _stm.Position = _stm.Length - data.Length;
                }
                else
                {
                    _stm = new CountedStream(new MemoryStream(data));
                }

                _eof = false;
            }
        }
Пример #2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="stm"></param>
 public DataReader(Stream stm)
 {
     _stm = new CountedStream(stm);
 }
Пример #3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="stm"></param>
 public DataWriter(Stream stm)
 {
     _stm = new CountedStream(stm);
 }