DEXTUploadJ
DEXTUploadJ References > FileDownload > Method > Download

Download Method

Version
1.0.1.0
Environment
Sun JDK 1.4
Target
Download
Signature 1
public void Download(java.lang.String SourceFilePath, boolean bAttach, boolean bPartial)
Signature 2
public void Download(java.lang.String SourceFilePath, java.lang.String TargetFileName, boolean bAttach, boolean bPartial)
Parameters
Name Signature Description
SourceFilePath java.lang.String Route of file being downloaded.
TargetFileName java.lang.String Assign the name of file being downloaded.
bAttach boolean

Selects whether to force save downloaded file.

true: Web browser outputs save dialogue box since download data is always saved as file.

false: Web browser processes differ according to MIME type. For example, web browser directly outputs download details if text/html (HTML file), outputs save dialogue box if application/x-zip-compressed (ZIP file).

bPartial boolean

Enabling partical content downloading by the Range request header

true: enable, false: disable

Return value
Throws
DEXTUploadException
java.io.FileNotFoundException
java.io.IOException
Description

Download files in server to client user (in assigned file name) through web browser.

Usage (Signature1)
FileDownload down = new FileDownload(request, response);

down.Download(FilePath, false, false);
							
Usage (Signature2)
FileDownload down = new FileDownload(request, response);

down.Download(FilePath, "FileName.bin", false, false);