最近在看“对象序列化”,刚开始看感觉很容易,看完后再重看一遍发现问题了。就是在要序列化的类对象具有writeObiect()方法和readObiect()方法,那两个方法的形式为:
private void writeObject(java.io.ObjectOutputStream out)throws IOException
private void readObject(java.io.ObjectInputStream in)throws IOException,ClassNotFoundException;
好像不用自己调用,ObjectOutputStream和ObjectinputStream会自动调用,其原理是怎样的???在想中。。。
private void writeObject(java.io.ObjectOutputStream out)throws IOException
private void readObject(java.io.ObjectInputStream in)throws IOException,ClassNotFoundException;
好像不用自己调用,ObjectOutputStream和ObjectinputStream会自动调用,其原理是怎样的???在想中。。。