HttpResponseBase.TransmitFile 方法

定義

將指定的檔案寫入 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified file to the HTTP response output stream, without buffering it in memory.

多載

TransmitFile(String, Int64, Int64)

將檔案的指定部分寫入至 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified part of a file to the HTTP response output stream, without buffering it in memory.

TransmitFile(String)

將指定的檔案寫入 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified file to the HTTP response output stream, without buffering it in memory.

TransmitFile(String, Int64, Int64)

將檔案的指定部分寫入至 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified part of a file to the HTTP response output stream, without buffering it in memory.

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

參數

filename
String

要寫入 HTTP 輸出資料流的檔案名稱。The name of the file to write to the HTTP output stream.

offset
Int64

檔案中開始寫入的位置。The position in the file where writing starts.

length
Int64

要寫入的位元組數,從 offset 開始。The number of bytes to write, starting at offset.

例外狀況

永遠。Always.

適用於

TransmitFile(String)

將指定的檔案寫入 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified file to the HTTP response output stream, without buffering it in memory.

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

參數

filename
String

要寫入 HTTP 輸出資料流的檔案名稱。The name of the file to write to the HTTP output stream.

例外狀況

永遠。Always.

適用於