using MediaBrowser.Common.Net;
using System.Collections.Generic;
using System.IO;
using MediaBrowser.Model.Services;
namespace MediaBrowser.Api.Playback
{
///
/// Class StaticRemoteStreamWriter
///
public class StaticRemoteStreamWriter : IStreamWriter, IHasHeaders
{
///
/// The _input stream
///
private readonly HttpResponseInfo _response;
///
/// The _options
///
private readonly IDictionary _options = new Dictionary();
public StaticRemoteStreamWriter(HttpResponseInfo response)
{
_response = response;
}
///
/// Gets the options.
///
/// The options.
public IDictionary Headers
{
get { return _options; }
}
///
/// Writes to.
///
/// The response stream.
public void WriteTo(Stream responseStream)
{
using (_response)
{
_response.Content.CopyTo(responseStream, 819200);
}
}
}
}