Uređivanje

Dijeli putem


HttpResponseWrapper.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:
 override void WriteFile(IntPtr fileHandle, long offset, long size);
public override void WriteFile (IntPtr fileHandle, long offset, long size);
override this.WriteFile : nativeint * int64 * int64 -> unit
Public Overrides 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

fileHandle is null.

offset is less than 0.

-or-

size is greater than the file size minus offset.

Applies to

WriteFile(String, Int64, Int64)

Writes the specified file to the HTTP response output stream.

public:
 override void WriteFile(System::String ^ filename, long offset, long size);
public override void WriteFile (string filename, long offset, long size);
override this.WriteFile : string * int64 * int64 -> unit
Public Overrides 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

offset is less than 0.

-or-

size is greater than the file size minus offset.

Applies to

WriteFile(String)

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

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

Parameters

filename
String

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

Exceptions

The filename parameter is null.

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:
 override void WriteFile(System::String ^ filename, bool readIntoMemory);
public override void WriteFile (string filename, bool readIntoMemory);
override this.WriteFile : string * bool -> unit
Public Overrides 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

The filename parameter is null.

Applies to