摘要:
一、ObjectOutputStream 对象存储到硬盘 1、构造 new ObjectOutputStream(FileOutputStream对象) 2、方法 writeObject(对象) 3、注意 对象类需要实现 Serializable 二、ObjectInputStream 读取硬盘的对 阅读全文
posted @ 2025-04-20 14:49
市丸银
阅读(21)
评论(0)
推荐(0)
摘要:
1、创建 xx.properties文件 2、创建 FileInputStream对象 3、创建Properties对象 4、properties加载FileinputStream对象 5、遍历文件数据 6、案例 package com.wt.buffer; import java.io.FileI 阅读全文
posted @ 2025-04-20 14:28
市丸银
阅读(21)
评论(0)
推荐(0)
摘要:
一、OutputStreamWriter 输出 1、构造 new OutputStreamWriter(FileOutputStream对象, 编码类型) 2、方法 用的时候就知道 3、案例 package com.wt.buffer; import java.io.FileOutputStream 阅读全文
posted @ 2025-04-20 12:08
市丸银
阅读(31)
评论(0)
推荐(0)
摘要:
一、字节缓存流(速度更快) 1、BufferedInputStream 字节输入缓存流 a、构造 new BufferedInputStream(FileInputStream对象) b、方法 与FileInputStream相似 2、BufferedOutputStream a、构造 new Bu 阅读全文
posted @ 2025-04-20 11:48
市丸银
阅读(40)
评论(0)
推荐(0)
摘要:
一、FileReader 1、概念 字符输入流,硬盘->内存 2、构造 new FileReader(字符串) new FileReader(file对象) 3、方法 //1.read(),一个一个字符读取,返回值字符的数字 //2.read(char[] ), 字符数组读取,返回值读取的长度 // 阅读全文
posted @ 2025-04-20 10:00
市丸银
阅读(29)
评论(0)
推荐(0)
摘要:
package com.wt.bytes; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOExceptio 阅读全文
posted @ 2025-04-20 08:57
市丸银
阅读(26)
评论(0)
推荐(0)

浙公网安备 33010602011771号