
java之io流
李小枫
嘿,你好呀!
展开
-
java之Io流知识点梳理
原创 2022-01-12 11:17:30 · 155 阅读 · 0 评论 -
java用io流实现创建文件(目录)和删除文件(目录)
1.创建文件 @Test public void test01() { String path = "f:\\io.txt"; File file = new File(path); try { file.createNewFile(); System.out.println("文件创建成功"); } catch (IOException e) { e.pr原创 2022-01-09 19:39:33 · 759 阅读 · 0 评论 -
java用io流实现文件复制
@Test public void testCopy() throws IOException { String path = "f:\\hello.txt";//源文件目录 String distPath = "d:\\hello.txt";//目标文件目录 FileInputStream inputStream = null;//初始化一个输入流,用来读取文件 FileOutputStream outputStream = nul.原创 2022-01-09 19:30:20 · 1546 阅读 · 0 评论