五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

PCI和PCle子系統(tǒng)\/--》ccys1473

2023-07-10 12:27 作者:拆字成詩  | 我要投稿

**

?* 實現(xiàn)Callable接口

?*/

public class Demo6_CreateCallable implements Callable<Boolean> {


? ? private String url;//網(wǎng)絡(luò)圖片地址

? ? private String name;//報錯扥文件名


? ? //有參構(gòu)造

? ? public Demo6_CreateCallable(String url, String name) {

? ? ? ? this.url = url;

? ? ? ? this.name = name;

? ? }


? ? //下載圖片線程的執(zhí)行體

? ? public Boolean call() throws Exception {

? ? ? ? WebDownloader webDownloader = new WebDownloader();

? ? ? ? webDownloader.downloader(url, name);

? ? ? ? System.out.println("下載了文件名為:" + name);

? ? ? ? return true;

? ? }


? ? public static void main(String[] args) throws ExecutionException, InterruptedException {

? ? ? ? Demo6_CreateCallable c = new Demo6_CreateCallable("https://img-home.csdnimg.cn/images/20201124032511.png", "1.png");

? ? ? ? Demo6_CreateCallable c1 = new Demo6_CreateCallable("https://img-home.csdnimg.cn/images/20201124032511.png", "2.png");

? ? ? ? Demo6_CreateCallable c2 = new Demo6_CreateCallable("https://img-home.csdnimg.cn/images/20201124032511.png", "3.png");

? ? ? ? //創(chuàng)建執(zhí)行服務(wù)

? ? ? ? ExecutorService ser = Executors.newFixedThreadPool(3);

? ? ? ? //提交執(zhí)行

? ? ? ? Future<Boolean> r = ser.submit(c);

? ? ? ? Future<Boolean> r1 = ser.submit(c1);

? ? ? ? Future<Boolean> r2 = ser.submit(c2);

? ? ? ? //獲取結(jié)果

? ? ? ? boolean res = r.get();

? ? ? ? boolean res1 = r1.get();

? ? ? ? boolean res2 = r2.get();

? ? ? ? //關(guān)閉服務(wù)

? ? ? ? ser.shutdownNow();

? ? }

}



PCI和PCle子系統(tǒng)\/--》ccys1473的評論 (共 條)

分享到微博請遵守國家法律
汉中市| 宁国市| 永安市| 临沭县| 乌海市| 乐都县| 平安县| 五河县| 湖口县| 清新县| 莆田市| 临颍县| 慈溪市| 宜昌市| 忻城县| 若羌县| 聂荣县| 深圳市| 调兵山市| 广州市| 盐亭县| 社会| 千阳县| 襄樊市| 湛江市| 广宗县| 剑川县| 峨眉山市| 黄冈市| 永新县| 灵川县| 新巴尔虎左旗| 乌苏市| 静安区| 乌鲁木齐县| 阿勒泰市| 东阳市| 赫章县| 晋江市| 全南县| 海兴县|