2 // System.Web.HttpResponseStream
\r
5 // Patrik Torstensson (Patrik.Torstensson@labs2.com)
\r
10 namespace System.Web {
\r
12 /// Simple wrapper around HttpWriter to support the Stream interface
\r
14 class HttpResponseStream : Stream {
\r
15 private HttpWriter _Writer;
\r
17 internal HttpResponseStream(HttpWriter Writer) {
\r
21 public override void Flush() {
\r
25 public override void Close() {
\r
29 public override int Read(byte [] buffer, int offset, int length) {
\r
30 throw new NotSupportedException();
\r
33 public override long Seek(long offset, SeekOrigin origin) {
\r
34 throw new NotSupportedException();
\r
37 public override void SetLength(long length) {
\r
38 throw new NotSupportedException();
\r
41 public override void Write(byte [] buffer, int offset, int length) {
\r
43 throw new ArgumentOutOfRangeException("offset");
\r
47 throw new ArgumentOutOfRangeException("length");
\r
50 _Writer.WriteBytes(buffer, offset, length);
\r
53 public override bool CanRead {
\r
59 public override bool CanSeek {
\r
65 public override bool CanWrite {
\r
71 public override long Length {
\r
73 throw new NotSupportedException();
\r
77 public override long Position {
\r
79 throw new NotSupportedException();
\r
83 throw new NotSupportedException();
\r