package com.shrimpking.t5;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
/**
* Created by IntelliJ IDEA.
*
* @Author : Shrimpking
* @create 2024/9/23 11:55
*/
public class SerTest2
{
public static void main(String[] args) throws IOException,ClassNotFoundException
{
//反序列化
File f = new File("d:\\test\\SerTest2.txt");
InputStream input = new FileInputStream(f);
ObjectInputStream ois = new ObjectInputStream(input);
Object obj = ois.readObject();
ois.close();
System.out.println(obj);
}
}