jellyfin/Emby.Common.Implementations/IO/SharpCifs/Util/Sharpen/PipedOutputStream.cs

38 lines
721 B
C#
Raw Normal View History

2017-04-02 00:36:06 +00:00
namespace SharpCifs.Util.Sharpen
{
internal class PipedOutputStream : OutputStream
2017-06-21 06:46:57 +00:00
{
PipedInputStream _ips;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public PipedOutputStream()
{
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public PipedOutputStream(PipedInputStream iss) : this()
{
Attach(iss);
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public override void Close()
{
_ips.Close();
base.Close();
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
internal void Attach(PipedInputStream iss)
{
_ips = iss;
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public override void Write(int b)
{
_ips.Write(b);
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public override void Write(byte[] b, int offset, int len)
{
_ips.Write(b, offset, len);
}
}
2017-04-02 00:36:06 +00:00
}