diff options
author | Oren Novotny <oren@novotny.org> | 2015-10-16 20:23:05 -0400 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2015-10-16 20:23:05 -0400 |
commit | de17e96f2d52a25a33e742d0f81e9052da77f49b (patch) | |
tree | 03ccef76aacc1bac6340df9faedf1d64dda76077 /crypto/src/util | |
parent | prep release for 1.8.0-rc2 (diff) | |
parent | Merge branch 'master' into master-vs12 (diff) | |
download | BouncyCastle.NET-ed25519-de17e96f2d52a25a33e742d0f81e9052da77f49b.tar.xz |
Merge branch 'master-vs12' into pcl
Diffstat (limited to 'crypto/src/util')
-rw-r--r-- | crypto/src/util/io/FilterStream.cs | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/crypto/src/util/io/FilterStream.cs b/crypto/src/util/io/FilterStream.cs new file mode 100644 index 000000000..1aa1f9889 --- /dev/null +++ b/crypto/src/util/io/FilterStream.cs @@ -0,0 +1,70 @@ +using System.IO; + +namespace Org.BouncyCastle.Utilities.IO +{ + public class FilterStream : Stream + { + public FilterStream(Stream s) + { + this.s = s; + } + public override bool CanRead + { + get { return s.CanRead; } + } + public override bool CanSeek + { + get { return s.CanSeek; } + } + public override bool CanWrite + { + get { return s.CanWrite; } + } + public override long Length + { + get { return s.Length; } + } + public override long Position + { + get { return s.Position; } + set { s.Position = value; } + } + protected override void Dispose(bool disposing) + { + if (disposing) + { + s.Dispose(); + } + base.Dispose(disposing); + } + public override void Flush() + { + s.Flush(); + } + public override long Seek(long offset, SeekOrigin origin) + { + return s.Seek(offset, origin); + } + public override void SetLength(long value) + { + s.SetLength(value); + } + public override int Read(byte[] buffer, int offset, int count) + { + return s.Read(buffer, offset, count); + } + public override int ReadByte() + { + return s.ReadByte(); + } + public override void Write(byte[] buffer, int offset, int count) + { + s.Write(buffer, offset, count); + } + public override void WriteByte(byte value) + { + s.WriteByte(value); + } + protected readonly Stream s; + } +} |