2022年3月29日

文件搜索案例

摘要: public class RecursionDemo01 { public static void main(String[] args) { cal(new File("E:\\娱乐"),"IMG_20220314_231021.jpg"); // 被搜索的源目录 被搜索文件名称 } public 阅读全文

posted @ 2022-03-29 22:04 我要当程序源 阅读(29) 评论(0) 推荐(0) 编辑

properties 与 IO

摘要: 存 public class PrintDemo01 { public static void main(String[] args) throws Exception{ //需求: 使用properties 把键值对信息存入到属性文件中去 Properties properties = new P 阅读全文

posted @ 2022-03-29 21:49 我要当程序源 阅读(17) 评论(0) 推荐(0) 编辑

打印流基础

摘要: //1. 创建一个打印流对象PrintStream ps = new PrintStream("E:\\idea_java_project\\io_project\\src\\dataCHEN.txt");ps.println(97);//换行打印ps.println('a');ps.println 阅读全文

posted @ 2022-03-29 21:41 我要当程序源 阅读(22) 评论(0) 推荐(0) 编辑

对象序列化

摘要: 记住一句话 序列化存储起来是用来 使用的, 不是用来看的 对象序列化的含义是什么? 把对象数据存入到文件中去 对象序列化用了哪个流? 对象字节输出流 ObjectOutputStream 方法Public void writeObject(Object obj) 序列化对象的要求是什么样的? 对象必 阅读全文

posted @ 2022-03-29 18:53 我要当程序源 阅读(31) 评论(0) 推荐(0) 编辑

缓冲流

摘要: 字符缓冲流 和字节缓冲流基本一样public class ByteBufferDemo { public static void main(String[] args) { try (InputStream is = new FileInputStream("E:\\idea_java_projec 阅读全文

posted @ 2022-03-29 17:15 我要当程序源 阅读(15) 评论(0) 推荐(0) 编辑

字符输入流与字符输出流

摘要: 字符输入流public class CharSetTest00 { public static void main(String[] args) throws Exception{ //代码UTF-8 文件GBK "D:\\resources\\data.txt" //1. 提取GBK文件的原始字节 阅读全文

posted @ 2022-03-29 17:14 我要当程序源 阅读(115) 评论(0) 推荐(0) 编辑

导航