diff --git a/src/SharpCompress/Common/Rar/RarCryptoWrapper.cs b/src/SharpCompress/Common/Rar/RarCryptoWrapper.cs index 5f5e8de7..e3403ecd 100644 --- a/src/SharpCompress/Common/Rar/RarCryptoWrapper.cs +++ b/src/SharpCompress/Common/Rar/RarCryptoWrapper.cs @@ -17,7 +17,7 @@ public RarCryptoWrapper(Stream actualStream, byte[] salt, ICryptKey key) _rijndael = new BlockTransformer(key.Transformer(salt)); } - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); diff --git a/src/SharpCompress/Common/SevenZip/ArchiveReader.cs b/src/SharpCompress/Common/SevenZip/ArchiveReader.cs index 42b5b6b2..c1376ad9 100644 --- a/src/SharpCompress/Common/SevenZip/ArchiveReader.cs +++ b/src/SharpCompress/Common/SevenZip/ArchiveReader.cs @@ -1393,7 +1393,7 @@ public FolderUnpackStream(ArchiveDatabase db, int p, int startIndex, List public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException(); diff --git a/src/SharpCompress/Common/Tar/TarReadOnlySubStream.cs b/src/SharpCompress/Common/Tar/TarReadOnlySubStream.cs index d61b04a2..2a340dea 100644 --- a/src/SharpCompress/Common/Tar/TarReadOnlySubStream.cs +++ b/src/SharpCompress/Common/Tar/TarReadOnlySubStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using SharpCompress.IO; @@ -47,7 +47,7 @@ protected override void Dispose(bool disposing) public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException(); diff --git a/src/SharpCompress/Common/Zip/PkwareTraditionalCryptoStream.cs b/src/SharpCompress/Common/Zip/PkwareTraditionalCryptoStream.cs index 273a7a3c..6ac48c6f 100644 --- a/src/SharpCompress/Common/Zip/PkwareTraditionalCryptoStream.cs +++ b/src/SharpCompress/Common/Zip/PkwareTraditionalCryptoStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.Common.Zip; @@ -87,10 +87,7 @@ public override void Write(byte[] buffer, int offset, int count) _stream.Write(encrypted, 0, encrypted.Length); } - public override void Flush() - { - //throw new NotSupportedException(); - } + public override void Flush() { } public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); diff --git a/src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs b/src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs index 093ac034..5742458a 100644 --- a/src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs +++ b/src/SharpCompress/Common/Zip/WinzipAesCryptoStream.cs @@ -73,7 +73,7 @@ protected override void Dispose(bool disposing) } } - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override int Read(byte[] buffer, int offset, int count) { diff --git a/src/SharpCompress/Compressors/Filters/BCJ2Filter.cs b/src/SharpCompress/Compressors/Filters/BCJ2Filter.cs index f658b385..1ed531cc 100644 --- a/src/SharpCompress/Compressors/Filters/BCJ2Filter.cs +++ b/src/SharpCompress/Compressors/Filters/BCJ2Filter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.Compressors.Filters; @@ -79,7 +79,7 @@ protected override void Dispose(bool disposing) public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => _baseStream.Length + _data1.Length + _data2.Length; diff --git a/src/SharpCompress/Compressors/Filters/Filter.cs b/src/SharpCompress/Compressors/Filters/Filter.cs index 93d95195..aa5e620d 100644 --- a/src/SharpCompress/Compressors/Filters/Filter.cs +++ b/src/SharpCompress/Compressors/Filters/Filter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.Compressors.Filters; @@ -40,7 +40,7 @@ protected override void Dispose(bool disposing) public override bool CanWrite => _isEncoder; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => _baseStream.Length; diff --git a/src/SharpCompress/Compressors/LZMA/DecoderStream.cs b/src/SharpCompress/Compressors/LZMA/DecoderStream.cs index 16865351..a3dbf37f 100644 --- a/src/SharpCompress/Compressors/LZMA/DecoderStream.cs +++ b/src/SharpCompress/Compressors/LZMA/DecoderStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using SharpCompress.Common.SevenZip; using SharpCompress.Compressors.LZMA.Utilites; @@ -14,7 +14,7 @@ internal abstract class DecoderStream2 : Stream public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException(); diff --git a/src/SharpCompress/Compressors/Rar/MultiVolumeReadOnlyStream.cs b/src/SharpCompress/Compressors/Rar/MultiVolumeReadOnlyStream.cs index 460d92eb..eda9c765 100644 --- a/src/SharpCompress/Compressors/Rar/MultiVolumeReadOnlyStream.cs +++ b/src/SharpCompress/Compressors/Rar/MultiVolumeReadOnlyStream.cs @@ -130,7 +130,7 @@ public override int Read(byte[] buffer, int offset, int count) public byte[] CurrentCrc { get; private set; } - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException(); diff --git a/src/SharpCompress/Compressors/Xz/ReadOnlyStream.cs b/src/SharpCompress/Compressors/Xz/ReadOnlyStream.cs index 71614df9..75188483 100644 --- a/src/SharpCompress/Compressors/Xz/ReadOnlyStream.cs +++ b/src/SharpCompress/Compressors/Xz/ReadOnlyStream.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System; using System.IO; @@ -23,7 +23,7 @@ public override long Position set => throw new NotSupportedException(); } - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(); diff --git a/src/SharpCompress/IO/BufferedSubStream.cs b/src/SharpCompress/IO/BufferedSubStream.cs index 99e2bfef..0b98f9d0 100644 --- a/src/SharpCompress/IO/BufferedSubStream.cs +++ b/src/SharpCompress/IO/BufferedSubStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.IO; @@ -26,7 +26,7 @@ public BufferedSubStream(Stream stream, long origin, long bytesToRead) public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => BytesLeftToRead; diff --git a/src/SharpCompress/IO/DataDescriptorStream.cs b/src/SharpCompress/IO/DataDescriptorStream.cs index 8ba9eb0f..b9a97389 100644 --- a/src/SharpCompress/IO/DataDescriptorStream.cs +++ b/src/SharpCompress/IO/DataDescriptorStream.cs @@ -45,7 +45,7 @@ protected override void Dispose(bool disposing) public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => _stream.Length; diff --git a/src/SharpCompress/IO/ReadOnlySubStream.cs b/src/SharpCompress/IO/ReadOnlySubStream.cs index c0b39d54..55c5b575 100644 --- a/src/SharpCompress/IO/ReadOnlySubStream.cs +++ b/src/SharpCompress/IO/ReadOnlySubStream.cs @@ -29,7 +29,7 @@ public ReadOnlySubStream(Stream stream, long? origin, long bytesToRead) public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException(); diff --git a/src/SharpCompress/IO/RewindableStream.cs b/src/SharpCompress/IO/RewindableStream.cs index ccdc8ee0..ff7fe3d0 100644 --- a/src/SharpCompress/IO/RewindableStream.cs +++ b/src/SharpCompress/IO/RewindableStream.cs @@ -75,7 +75,7 @@ public void StartRecording() public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => stream.Length; diff --git a/tests/SharpCompress.Test/Mocks/FlushOnDisposeStream.cs b/tests/SharpCompress.Test/Mocks/FlushOnDisposeStream.cs index 194e7788..062351a1 100644 --- a/tests/SharpCompress.Test/Mocks/FlushOnDisposeStream.cs +++ b/tests/SharpCompress.Test/Mocks/FlushOnDisposeStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.Test.Mocks; @@ -27,7 +27,7 @@ public override long Position set => inner.Position = value; } - public override void Flush() => throw new NotImplementedException(); + public override void Flush() { } public override int Read(byte[] buffer, int offset, int count) => inner.Read(buffer, offset, count); diff --git a/tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs b/tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs index cef93a38..e18bd707 100644 --- a/tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs +++ b/tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace SharpCompress.Test.Mocks; @@ -29,7 +29,7 @@ protected override void Dispose(bool disposing) public override bool CanSeek => false; public override bool CanWrite => false; - public override void Flush() => throw new NotSupportedException(); + public override void Flush() { } public override long Length => throw new NotSupportedException();