Developing Java Beans private void readObject(ObjectInputStream stream) throws

Developing Java Beans private void readObject(ObjectInputStream stream) throws java.io.IOException { System.out.println(”readObject called for class A”); try { stream.defaultReadObject(); } catch (ClassNotFoundException e) { throw new IOException(); } } public A() { } } class B extends A { protected int b; private void writeObject(ObjectOutputStream stream) throws java.io.IOException { System.out.println(”writeObject called for class B”); stream.defaultWriteObject(); } private void readObject(ObjectInputStream stream) throws java.io.IOException { System.out.println(”readObject called for class B”); try { stream.defaultReadObject(); } catch (ClassNotFoundException e) { throw new IOException(); } } public B() { super(); } } class C extends B { protected int c; private void writeObject(ObjectOutputStream stream) throws java.io.IOException { System.out.println(”writeObject called for class C”); stream.defaultWriteObject(); } page 80
Note: If you are looking for cheap and reliable provider to host and run your servlet application check Vision servlet hosting services

Comments are closed.