예제 #1
0
 /// <summary>
 /// Initializes an instance of a buffered range reader stream.
 /// </summary>
 /// <param name="rangeReader">The interface used for reading ranges of bytes.</param>
 /// <param name="length">The total length of the file reader by <paramref name="rangeReader"/>.</param>
 /// <param name="bufferSizeProvider">The interface used to determine what buffer sizes to use.</param>
 public BufferedRangeStream(IRangeReader rangeReader, long length, IBufferSizeProvider bufferSizeProvider)
     : base(length)
 {
     _rangeReader        = rangeReader;
     _bufferSizeProvider = bufferSizeProvider;
     _buffer             = new BlockMemoryStream();
     BufferPosition      = length;
 }
예제 #2
0
 /// <summary>
 /// Initializes an instance of a unbuffered range reader stream.
 /// </summary>
 /// <param name="rangeReader">The interface used for reading ranges of bytes.</param>
 /// <param name="length">The total length of the file reader by <paramref name="rangeReader"/>.</param>
 public RangeStream(IRangeReader rangeReader, long length)
     : base(length)
 {
     _rangeReader = rangeReader;
 }