Editar

Compartir a través de


HttpResponseBase.WriteFile Method

Definition

Writes the specified file to the HTTP response output stream.

Overloads

WriteFile(IntPtr, Int64, Int64)

Writes the specified file to the HTTP response output stream.

WriteFile(String, Int64, Int64)

Writes the specified file to the HTTP response output stream.

WriteFile(String)

Writes the contents of the specified file to the HTTP response output stream as a file block.

WriteFile(String, Boolean)

Writes the contents of the specified file to the HTTP response output stream and specifies whether the content is written as a memory block.

WriteFile(IntPtr, Int64, Int64)

Writes the specified file to the HTTP response output stream.

public:
 virtual void WriteFile(IntPtr fileHandle, long offset, long size);
public virtual void WriteFile (IntPtr fileHandle, long offset, long size);
abstract member WriteFile : nativeint * int64 * int64 -> unit
override this.WriteFile : nativeint * int64 * int64 -> unit
Public Overridable Sub WriteFile (fileHandle As IntPtr, offset As Long, size As Long)

Parameters

fileHandle
IntPtr

nativeint

The file handle of the file to write to the HTTP output stream.

offset
Int64

The position in the file where writing starts.

size
Int64

The number of bytes to write, starting at offset.

Exceptions

Applies to

WriteFile(String, Int64, Int64)

Writes the specified file to the HTTP response output stream.

public:
 virtual void WriteFile(System::String ^ filename, long offset, long size);
public virtual void WriteFile (string filename, long offset, long size);
abstract member WriteFile : string * int64 * int64 -> unit
override this.WriteFile : string * int64 * int64 -> unit
Public Overridable Sub WriteFile (filename As String, offset As Long, size As Long)

Parameters

filename
String

The name of the file to write to the HTTP output stream.

offset
Int64

The position in the file where writing starts.

size
Int64

The number of bytes to write, starting at offset.

Exceptions

Applies to

WriteFile(String)

Writes the contents of the specified file to the HTTP response output stream as a file block.

public:
 virtual void WriteFile(System::String ^ filename);
public virtual void WriteFile (string filename);
abstract member WriteFile : string -> unit
override this.WriteFile : string -> unit
Public Overridable Sub WriteFile (filename As String)

Parameters

filename
String

The name of the file to write to the HTTP output stream.

Exceptions

Applies to

WriteFile(String, Boolean)

Writes the contents of the specified file to the HTTP response output stream and specifies whether the content is written as a memory block.

public:
 virtual void WriteFile(System::String ^ filename, bool readIntoMemory);
public virtual void WriteFile (string filename, bool readIntoMemory);
abstract member WriteFile : string * bool -> unit
override this.WriteFile : string * bool -> unit
Public Overridable Sub WriteFile (filename As String, readIntoMemory As Boolean)

Parameters

filename
String

The name of the file to write to the current response.

readIntoMemory
Boolean

true to write the file into a memory block.

Exceptions

Applies to