随笔分类 -  I/O流学习

摘要:/** * 字节流--读取并复制图片 * @param targetPath */public static void readImageAndCopy(String targetPath){ File file=new File("F:\\CreateDemo\\demo.jpg"); FileI 阅读全文
posted @ 2019-01-18 11:17 唐宋丶元明清 阅读(651) 评论(0) 推荐(0) 编辑
摘要:public static void readFile(){ File file=new File("F:\\CreateDemo\\demo.txt"); if(!file.exists()){ //如果文件不存在,创建并写入信息 createFileAndWriter("Hello I/O!") 阅读全文
posted @ 2019-01-18 11:16 唐宋丶元明清 阅读(168) 评论(0) 推荐(0) 编辑
摘要:public static void createFileAndWriter(String message) { File file = new File("F:\\CreateDemo\\"); if (!file.exists()) { file.mkdir();//创建一个新目录 } File 阅读全文
posted @ 2019-01-18 11:15 唐宋丶元明清 阅读(475) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示