1 FileInputStream f = new FileInputStream("a.txt");
FileOutputStream f = new FileOutputStream("a.txt");
2 ObjectOutputStream o = new ObjectOutputstream(f);
ObjectInputStream o = new ObjectInputstream(f);
Java文件与对象流操作
本文介绍了使用Java进行文件输入输出操作及对象序列化的具体实现方法。包括利用FileInputStream和FileOutputStream进行文件读写,以及通过ObjectOutputStream和ObjectInputStream实现对象的序列化与反序列化。
1 FileInputStream f = new FileInputStream("a.txt");
FileOutputStream f = new FileOutputStream("a.txt");
2 ObjectOutputStream o = new ObjectOutputstream(f);
ObjectInputStream o = new ObjectInputstream(f);

被折叠的 条评论
为什么被折叠?