第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么程序總是提醒文件不存在? 文件的確是存在的

public static void copyFileByBuffer(File srcFile,File desFile) throws IOException{

if(!srcFile.exists()){

throw new IllegalArgumentException("The file is not exists.");

}

if(!desFile.isFile()){

throw new IllegalArgumentException("This name not target a file");

}

BufferedInputStream bis = new BufferedInputStream(new FileInputStream(srcFile));

BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(desFile));

int c;

while((c=bis.read())!=-1){

bos.write(c);

bos.flush();

}

bis.close();

bos.close();

}

public static void main(String[] args) throws IOException {

// IOunit.Outputtest();

// IOunit.FileCopy(new File("e:\\word.txt"), new File("e:\\word1.txt"));

IOunit.copyFileByBuffer(new File("E:\\迅雷下載\\weixin6327android880.apk"),

new File("E:\\迅雷下載\\XMPSetupLite-xl81.exe"));

}



錯誤信息:

Exception in thread "main" java.lang.IllegalArgumentException: This name not target a file

at com.wfu.IOunit.copyFileByBuffer(IOunit.java:85)

at com.wfu.IOunit.main(IOunit.java:102)


正在回答

1 回答

apk不是文件,我是這么認(rèn)為的

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

leeu 提問者

換成一個簡單的txt文件也是如此。
2016-10-14 回復(fù) 有任何疑惑可以回復(fù)我~
#2

leeu 提問者

我懂了。。。。。第二個if應(yīng)該寫srcFile。。。。
2016-10-14 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

為什么程序總是提醒文件不存在? 文件的確是存在的

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號