summary refs log tree commit diff
path: root/crypto/src/cms/CMSProcessableInputStream.cs
diff options
context:
space:
mode:
authorJeffrey Stedfast <jeff@xamarin.com>2015-10-19 10:45:20 -0400
committerJeffrey Stedfast <jeff@xamarin.com>2015-10-19 10:45:20 -0400
commit9bb283017763ea21484dd7ece2a9b6f32e926ede (patch)
tree6ef7d0f0e1c7d1e565bbd9e92aafdff786a56835 /crypto/src/cms/CMSProcessableInputStream.cs
parentUpdated Visual Studio 2010 project files (diff)
parentSigOutputStream removed from the other-platform path too. (diff)
downloadBouncyCastle.NET-ed25519-9bb283017763ea21484dd7ece2a9b6f32e926ede.tar.xz
Merge branch 'master' into vs2010
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; } } }