コード例 #1
0
ファイル: gzipstreamtest.cs プロジェクト: mintwans/cpsc483
        public void TestNotSupported()
        {
            Stream      baseStream = new MemoryStream(this.compressedData);
            GZipStream  gzipStream = new GZipStream(baseStream, CompressionMode.Decompress);

            try { gzipStream.Write(null, 0, 0); }
            catch (NotSupportedException) {}

            try { gzipStream.Flush(); }
            catch (NotSupportedException) {}

            try { gzipStream.Seek(0, SeekOrigin.Begin); }
            catch (NotSupportedException) {}

            try { gzipStream.SetLength(0); }
            catch (NotSupportedException) {}
        }