TeamMentor.CoreLib.ScriptCombiner.WriteBytes C# (CSharp) Method

WriteBytes() public method

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

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

            response.ContentType = contentType;

            response.AppendHeader("Content-Encoding", isCompressed ? "gzip" : "utf-8");

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