Table of Contents

Class FileStreamResult

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Sends binary content to the response by using a Stream instance.

public class FileStreamResult : FileResult
Inheritance
FileStreamResult
Inherited Members

Constructors

FileStreamResult(Stream, string)

Initializes a new instance of the FileStreamResult class.

public FileStreamResult(Stream fileStream, string contentType)

Parameters

fileStream Stream

The stream to send to the response.

contentType string

The content type to use for the response.

Exceptions

ArgumentNullException

The fileStream parameter is null.

Properties

FileStream

Gets the stream that will be sent to the response.

public Stream FileStream { get; }

Property Value

Stream

The file stream.

Methods

WriteFile(HttpResponseBase)

Writes the file to the response.

protected override void WriteFile(HttpResponseBase response)

Parameters

response HttpResponseBase

The response.