summary refs log tree commit diff
path: root/crypto/src/cms/CMSProcessableInputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/cms/CMSProcessableInputStream.cs')
-rw-r--r--crypto/src/cms/CMSProcessableInputStream.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crypto/src/cms/CMSProcessableInputStream.cs b/crypto/src/cms/CMSProcessableInputStream.cs
index 7fdd1dfef..6dff7c212 100644
--- a/crypto/src/cms/CMSProcessableInputStream.cs
+++ b/crypto/src/cms/CMSProcessableInputStream.cs
@@ -8,23 +8,23 @@ namespace Org.BouncyCastle.Cms
 	public class CmsProcessableInputStream
 		: CmsProcessable, CmsReadable
 	{
-		private Stream input;
-		private bool used = false;
+		private readonly Stream input;
 
-		public CmsProcessableInputStream(
-			Stream input)
+        private bool used = false;
+
+        public CmsProcessableInputStream(Stream input)
 		{
 			this.input = input;
 		}
 
-		public Stream GetInputStream()
+        public virtual Stream GetInputStream()
 		{
 			CheckSingleUsage();
 
-			return input;
+            return input;
 		}
 
-		public void Write(Stream output)
+        public virtual void Write(Stream output)
 		{
 			CheckSingleUsage();
 
@@ -32,20 +32,20 @@ namespace Org.BouncyCastle.Cms
 			input.Close();
 		}
 
-		[Obsolete]
-		public object GetContent()
+        [Obsolete]
+		public virtual object GetContent()
 		{
 			return GetInputStream();
 		}
 
-		private void CheckSingleUsage()
+        protected virtual void CheckSingleUsage()
 		{
 			lock (this)
 			{
 				if (used)
 					throw new InvalidOperationException("CmsProcessableInputStream can only be used once");
 
-				used = true;
+                used = true;
 			}
 		}
 	}