PdfRpt.Core.Helper.SoftHttpContext.FlushInBrowser C# (CSharp) Метод

FlushInBrowser() публичный статический Метод

Flushes the fileData into the user's browser. It's designed for the ASP.NET Applications.
public static FlushInBrowser ( string fileName, byte fileData, FlushType flushType = FlushType.Attachment ) : void
fileName string name of the file
fileData byte byte array containing the file's data
flushType FlushType How to flush an in memory PDF file
Результат void
        public static void FlushInBrowser(string fileName, byte[] fileData, FlushType flushType = FlushType.Attachment)
        {
            var fileLength = fileData.Length;

            var context = getCurrentHttpContext();
            var response = getCurrentResponse(context);
            setNoCache(response);
            setContentType(response);
            addHeaders(fileName, fileLength, response, flushType);
            setBufferTrue(response);
            clearResponse(response);
            writeToOutputStream(fileData, fileLength, response);
            responseEnd(response);
        }