ScriptCombiner.WriteBytes C# (CSharp) Method

WriteBytes() public method

public WriteBytes ( byte bytes, bool isCompressed ) : void
bytes byte
isCompressed bool
return void
    public void WriteBytes(byte[] bytes, bool isCompressed)
    {
        var response = context.Response;

        response.AppendHeader("Content-Length", bytes.Length.ToString());

        response.ContentType = this.contentType;

        if (isCompressed)
            response.AppendHeader("Content-Encoding", "gzip");
        else
            response.AppendHeader("Content-Encoding", "utf-8");

        response.ContentEncoding = Encoding.Unicode;
        response.OutputStream.Write(bytes, 0, bytes.Length);
        response.Flush();
    }