From fe5895d373fbff35712d65dd2d788d098dcf18e9 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Thu, 19 Dec 2013 10:35:15 +0000 Subject: [PATCH] Implement Can* --- SharpCompress/Compressor/Rar/RarStream.cs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/SharpCompress/Compressor/Rar/RarStream.cs b/SharpCompress/Compressor/Rar/RarStream.cs index f798fa7c..9f7cf7be 100644 --- a/SharpCompress/Compressor/Rar/RarStream.cs +++ b/SharpCompress/Compressor/Rar/RarStream.cs @@ -8,7 +8,7 @@ namespace SharpCompress.Compressor.Rar { private readonly Unpack unpack; private readonly FileHeader fileHeader; - private Stream readStream; + private readonly Stream readStream; private bool fetch = false; @@ -45,22 +45,30 @@ namespace SharpCompress.Compressor.Rar public override bool CanRead { - get { throw new NotImplementedException(); } + get + { + return true; + } } public override bool CanSeek { - get { throw new NotImplementedException(); } + get + { + return false; + } } public override bool CanWrite { - get { throw new NotImplementedException(); } + get + { + return false; + } } public override void Flush() { - throw new NotImplementedException(); } public override long Length @@ -112,7 +120,9 @@ namespace SharpCompress.Compressor.Rar public override void Write(byte[] buffer, int offset, int count) { if (!fetch) + { throw new NotImplementedException(); + } if (outCount > 0) { int toCopy = outCount < count ? outCount : count;