摘要:
字节型缓冲流,BufferedOutputStream默认缓冲区大小 8192字节byte,满了自动flush() @Test public void test6(){ File srcFile = new File("FLAMING MOUNTAIN.JPG"); File destFile = 阅读全文
摘要:
字节流读写非文本文件(图片、视频等) @Test public void test5(){ File srcFile = new File("FLAMING MOUNTAIN.JPG"); File destFile = new File("FLAMING MOUNTAIN1.JPG"); File 阅读全文
摘要:
@Test public void test4(){ FileReader fr = null; FileWriter fw = null; try { fr = new FileReader("hello.txt"); fw = new FileWriter("hello1.txt"); char 阅读全文
摘要:
FileWriter字符输出 @Test public void test3(){ File file = new File("hello1.txt"); FileWriter fw = null; try { //自动创建文件。默认false,覆盖写;true追加写 fw = new FileWr 阅读全文
摘要:
FileReader 字符输入流 @Test public void test2(){ File file = new File("hello.txt"); FileReader fr = null; try { fr = new FileReader(file); char[] cbuf = ne 阅读全文
摘要:
FileReader 字符输入流 @Test public void test1(){ File file = new File("hello.txt"); FileReader fr = null; try { fr = new FileReader(file); //返回读取的内容 int da 阅读全文
摘要:
阅读全文
摘要:
File类的判断功能 @Test public void test5(){ File file = new File("hello.txt"); //判断是否是文件目录 System.out.println(file.isDirectory()); //判断是否是文件 System.out.prin 阅读全文
摘要:
File类的获取功能 @Test public void test2(){ File file1 = new File("hello.txt"); File file2 = new File("C:\\Users\\Mi\\Documents\\project\\idea\\JavaBase\\he 阅读全文
摘要:
构造器1 File(String pathname) //相对路径 File file1 = new File("hello.txt"); //windows绝对路径 File file2 = new File("C:\\Users\\Mi\\Documents\\project\\idea\\Ja 阅读全文