diff options
author | Oren Novotny <oren@novotny.org> | 2015-10-16 20:12:28 -0400 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2015-10-16 20:12:28 -0400 |
commit | 424bd67b1ab4a909dd6f1d598ad862c30b90c4c6 (patch) | |
tree | a0eee2d51cde61950401a6da34c23da8dcc37e76 /crypto/src/util | |
parent | Merge branch 'master' into master-vs12 (diff) | |
parent | Port of non-blocking TLS API from Java (diff) | |
download | BouncyCastle.NET-ed25519-424bd67b1ab4a909dd6f1d598ad862c30b90c4c6.tar.xz |
Merge branch 'master' into master-vs12
Diffstat (limited to 'crypto/src/util')
-rw-r--r-- | crypto/src/util/io/FilterStream.cs | 66 |
1 files changed, 66 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..260ce1789 --- /dev/null +++ b/crypto/src/util/io/FilterStream.cs @@ -0,0 +1,66 @@ +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; } + } + public override void Close() + { + s.Close(); + } + 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; + } +} |