摘要: 首先要导入conmmon.jar包 FileUtils类 package cn.lijun.demo2; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; public class Demo2Commos { public static void ma... 阅读全文
posted @ 2019-03-27 21:07 芯-觞 阅读(1332) 评论(0) 推荐(0)
摘要: PrintWriter package cn.lijun.demo1; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintWriter; // 打印流 PrintStream PrintWriter /... 阅读全文
posted @ 2019-03-27 20:05 芯-觞 阅读(436) 评论(0) 推荐(0)
摘要: ObjectOutputStream 序列化 ObjectInputStream反序列化 序列化的类必须继承 Serializable; 不想序列化的属性可以加上transient static 用静态修饰符修饰 不会被序列化 因为序列化是把对象的数据持久化存储 而静态属于类加载的数据 不会被序列化 package cn.lijun.com; import java.io.Seri... 阅读全文
posted @ 2019-03-27 19:25 芯-觞 阅读(138) 评论(0) 推荐(0)