title: agility html parser read from buffer/stream
body: <p>I am trying to alter an HTML page before it renders in a browser using an HTTP module. I tried to implement the agility HTML parser, but it only seems to read from files. </p>
  
  <p>How can I have it read from a  buffer/stream?</p>
  
  <pre><code>public override void Write(byte[] buffer, int offset, int count)
      {
        byte[] data = new byte[count];
        Buffer.BlockCopy(buffer, offset, data, 0, count);
        string html = System.Text.Encoding.Default.GetString(buffer);
  
        HtmlDocument doc = new HtmlDocument();
        doc.Load(html);
        foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href"])
        {
        HtmlAttribute att = link["href"];
        att.Value = FixLink(att);
        }
      }
  </code></pre>