I have an HttpResponse.Filter filter that replaces text in HTML.
I created a class that comes from Stream and implemented the Write method:
public override void Write(byte[] buffer, int offset, int count)
I read all the bytes from the buffer and saved them in a private StringBuilder, then I replace the text and write the string back to Stream.
But how to determine when the stream is at the end of the stream. That is, how to determine when to write html (string) to a stream?
source
share