diff options
author | David Hook <dgh@bouncycastle.org> | 2015-10-12 17:04:10 +1100 |
---|---|---|
committer | David Hook <dgh@bouncycastle.org> | 2015-10-12 17:04:10 +1100 |
commit | 1e6707bb602a4b412537111b2af100321abf9874 (patch) | |
tree | 130d801195b71b70f59b9e9e6ba95753b9133132 /crypto/src/util | |
parent | Fixed generics (diff) | |
download | BouncyCastle.NET-ed25519-1e6707bb602a4b412537111b2af100321abf9874.tar.xz |
Introduced Utilities.IO.FilterStream
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; + } +} |