但我得到了以下错误:
java.io.FileNotFoundException:HTTP:\ online1.tingclass.com \教训\ shi0529 \ 43 \ 32.mp3(文件名,目录名或卷标语法不正确)
public static void Copy_File(String From_File,String To_File)
{
try
{
FileChannel sourceChannel=new FileInputStream(From_File).getChannel();
FileChannel destinationChannel=new FileOutputStream(To_File).getChannel();
sourceChannel.transferTo(0,sourceChannel.size(),destinationChannel);
// or
// destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
sourceChannel.close();
destinationChannel.close();
}
catch (Exception e) { e.printStackTrace(); }
}
然而,如果我从手工浏览器做到这一点,该文件是存在的,我不知道为什么它不工作,什么是正确的做法?
弗兰克
2010-09-06
Frank