private void WriteFile(string responseType)
{
this.output = this.GetCache();
if (this.output != null)
{
this.Send(this.output, responseType);
return;
}
this.sb = new StringBuilder(4096);
using (this.stream)
{
StreamReader reader = new StreamReader(this.stream);
this.sb.Append(reader.ReadToEnd());
reader.Close();
}
string data = responseType == "text/css"
? this.sm.ParseCssWebResourceUrls(this.sb.ToString())
: this.sb.ToString();
byte[] content = this.compress ? CompressionUtils.GZip(data) : Encoding.UTF8.GetBytes(data);
this.SetCache(content);
this.Send(content, responseType);
}