SetDownloadStream Method

Sets the stream to which the downloaded data from the server will be written.

Syntax

public fun setDownloadStream(downloadStream: OutputStream?)

Remarks

This method is used to set the stream to which the downloaded data from the server will be written. If a download stream is set before the Download method is called, the downloaded data will be written to the stream. The stream should be open and normally set to position 0. The component will automatically close this stream if CloseStreamAfterTransfer is true (default). If the stream is closed, you will need to call SetDownloadStream again before calling Download again. The downloaded content will be written starting at the current position in the stream. If StartByte is non zero the server will be instructed to skip those bytes before starting to send the content of the file so it is up to you to build the stream appropriately in that case.

Note: SetDownloadStream and LocalFile will reset the other.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks 2020 Kotlin Edition - Version 20.0 [Build 7941]