路径老无效怎么回事!!!!
4条回答 默认 最新
- Arvin533 2015-03-29 07:42关注
试试这个
public class CopyFile {public static void main(String[] args) throws Exception {
String path="E:\1.doc";
String path1="F:\sae\0.doc";
File file=new File(path);
File file1=new File(path1);FileInputStream in=new FileInputStream(file); BufferedInputStream bufferin=new BufferedInputStream(in); FileOutputStream out=new FileOutputStream(file1); BufferedOutputStream bufferout=new BufferedOutputStream(out); int c=0; byte buffer[]=new byte[1024]; while((c=bufferin.read(buffer))!=-1){ bufferout.write(buffer,0,c); } System.out.println(buffer); bufferout.flush(); in.close(); out.close();
}
}解决 1无用
悬赏问题
- ¥15 Python爬取指定微博话题下的内容,保存为txt
- ¥15 vue2登录调用后端接口如何实现
- ¥65 永磁型步进电机PID算法
- ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
- ¥88 找成都本地经验丰富懂小程序开发的技术大咖
- ¥15 如何处理复杂数据表格的除法运算
- ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
- ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
- ¥15 latex怎么处理论文引理引用参考文献
- ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?