将序列化对象写入文件后,可以从文件中读取并反序列化它,也就是说,表示对象及其数据的数据类型信息和字节可以用来在内存中重新创建该对象。示例 import java.io.*; public class DeserializeDemo { public static void main(String [] args) { Employee e = null; try { FileInputStream fileIn = new FileInputStream("/tmp/employee.ser"); ObjectInputStream in = new ObjectInputStream(fileIn); e = (Employee) in.readObject(); in.close(); ... 阅读更多