摘要: public class BufferTest { public static void main(String[] args) throws Exception{// testBufferedReader();// testBufferedWrite("我是你爸爸"); copyFile("C:\ 阅读全文
posted @ 2022-03-15 17:49 SmallPepsi 阅读(41) 评论(0) 推荐(0)
摘要: public class BufferTest { public static void main(String[] args) throws Exception {// testBufferedInputStream();// testBufferedOutputStream(); copyFil 阅读全文
posted @ 2022-03-15 17:48 SmallPepsi 阅读(44) 评论(0) 推荐(0)
摘要: public static void testFileWriter(String text, String outPath) { try { FileWriter fw = new FileWriter(outPath); //将字符串写到内存中 fw.write(text); //将内存中的数据刷 阅读全文
posted @ 2022-03-15 16:56 SmallPepsi 阅读(67) 评论(0) 推荐(0)
摘要: public static void copyFile(String inPath, String outPath) { try { FileReader fr = new FileReader(inPath); FileWriter fw = new FileWriter(outPath); ch 阅读全文
posted @ 2022-03-15 16:56 SmallPepsi 阅读(101) 评论(0) 推荐(0)
摘要: public static void testFileReader(String inPath) { try { //创建字符输入流的对象 FileReader fr = new FileReader(inPath); //创建存放数据的缓冲数组 char[] a = new char[10]; / 阅读全文
posted @ 2022-03-15 16:55 SmallPepsi 阅读(182) 评论(0) 推荐(0)