/// <summary> /// Wrap a stream to de-chunk. /// </summary> public HttpChunkedStreamWrapper(Stream source, TimeSpan timeout) { _source = source ?? throw new ArgumentNullException(nameof(source)); _timeout = timeout; _complete = false; _buffer = new PushbackBuffer(); }
/// <summary> /// Wrap a stream to de-chunk. /// </summary> public HttpChunkedStreamWrapper(Stream source, TimeSpan timeout) { _source = source; _timeout = timeout; _complete = false; _buffer = new PushbackBuffer(); }
/// <summary> /// Create a pushback wrapper around another stream. /// You should not directly interact with the stream after this. /// </summary> /// <param name="baseStream"></param> public PushbackInputStream(Stream baseStream) { _baseStream = baseStream; _position = _baseStream.Position; _pushbackBuffer = new PushbackBuffer(_baseStream); }
/// <summary> /// Create a pushback wrapper around another stream. /// You should not directly interact with the stream after this. /// </summary> /// <param name="baseStream"></param> public PushbackInputStream(Stream baseStream) { _baseStream = baseStream ?? throw new ArgumentNullException(nameof(baseStream)); _position = _baseStream.Position; _pushbackBuffer = new PushbackBuffer(_baseStream); }
/// <summary> /// Internal, for proxy generation in tests /// </summary> protected PushbackInputStream() { _baseStream = new MemoryStream(); _pushbackBuffer = new PushbackBuffer(_baseStream); }