📄 downfile.java
字号:
package com.downfile;
/**
* 程序主文件
*/
public class DownFile
{
String urlFile;//网络文件地址
int threadNum;//要启动下载的线程数
String localFileAddress;//要保存的本地地址,请保重该处没有名为"tmp"的文件夹
public DownFile(String urlFile,int threadNum,String localFileAddress)
{
/**
* 下面的由使用者自己设为定
*/
this.urlFile=urlFile;
this.threadNum=threadNum;
this.localFileAddress=localFileAddress;
}
public void startDownFile()
{
Thread thread=new Thread(new MultiThreadGetFile(urlFile,threadNum,localFileAddress));
thread.start();
}
public static void main(String[] args)
{
DownFile main = new DownFile("http://dl.360safe.com/setup.exe",9,"d:\\multiDownTest\\");
main.startDownFile();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -