摘要: // 第一种:通过字节流实现快速拷贝文件 try { long before=System.currentTimeMillis(); FileInputStream fis=new FileInputStream("web.rar"); BufferedInputStream b... 阅读全文
posted @ 2015-10-29 15:06 陌路黄泉 阅读(224) 评论(0) 推荐(0)
摘要: File file=new File("newhello.txt"); if(file.exists()&&file.isFile()) { try { //创建文件输入流 FileInputStream fis=new FileInputStream(file); //... 阅读全文
posted @ 2015-10-29 14:19 陌路黄泉 阅读(260) 评论(0) 推荐(0)
摘要: public static void main(String[] args) {// TODO Auto-generated method stub//方法名、参数名小写开头 类名大写开头// ../获取相对路径printFiles(new File("../helloFile"),1);}publ... 阅读全文
posted @ 2015-10-29 10:54 陌路黄泉 阅读(236) 评论(0) 推荐(0)
摘要: // TODO Auto-generated method stub File file=new File("newhello.txt"); //文件是否存在 System.out.println("文件是否存在:"+file.exists()); //读取文件名称 System... 阅读全文
posted @ 2015-10-29 10:43 陌路黄泉 阅读(451) 评论(0) 推荐(0)