using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace MyDownloader.Extension.Zip
{
///
/// Stream without
///
internal class NoCloseSubStream : Stream
{
Stream baseStream;
public NoCloseSubStream(Stream b)
{
baseStream = b;
}
///
/// I needed to implement the abstract member.
///
public override bool CanRead
{
get
{
return baseStream.CanRead;
}
}
///
/// I needed to implement the abstract member.
///
public override bool CanSeek
{
get
{
return baseStream.CanSeek;
}
}
///
/// I needed to implement the abstract member.
///
public override bool CanWrite
{
get
{
return baseStream.CanWrite;
}
}
///
/// I needed to implement the abstract member.
///
public override long Length
{
get
{
return baseStream.Length;
}
}
///
/// I needed to implement the abstract member.
///
public override long Position
{
get
{
return baseStream.Position;
}
set
{
baseStream.Position = value;
}
}
///
/// I needed to implement the abstract member.
///
public override long Seek(long offset, SeekOrigin origin)
{
return baseStream.Seek(offset, origin);
}
///
/// I needed to implement the abstract member.
///
public override void SetLength(long val)
{
baseStream.SetLength(val);
}
///
/// I needed to implement the abstract member.
///
public override int ReadByte()
{
return baseStream.ReadByte();
}
///
/// I needed to implement the abstract member.
///
public override int Read(byte[] b, int off, int len)
{
return baseStream.Read(b, off, len);
}
public override void Write(byte[] buf, int off, int len)
{
baseStream.Write(buf, off, len);
}
public override void WriteByte(byte bv)
{
baseStream.WriteByte(bv);
}
public override void Close()
{
baseStream = null;
}
public override void Flush()
{
baseStream.Flush();
}
}
}