1 22 package org.jboss.test.aop.jdk15.annotated; 23 24 import java.io.Externalizable ; 25 import java.io.IOException ; 26 import java.io.ObjectInput ; 27 import java.io.ObjectOutput ; 28 29 34 public class ExternalizableMixin implements Externalizable 35 { 36 public static boolean read = false; 37 public static boolean write = false; 38 39 NoInterfacesPOJO pojo; 40 41 public ExternalizableMixin(NoInterfacesPOJO pojo) 42 { 43 System.out.println("ExternalizableMixin constructor"); 44 this.pojo = pojo; 45 } 46 47 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException 48 { 49 System.out.println("ExternalizableMixin readExternal"); 50 read = true; 51 pojo.stuff = in.readUTF(); 52 } 53 54 public void writeExternal(ObjectOutput out) throws IOException 55 { 56 System.out.println("ExternalizableMixin writeExternal"); 57 write = true; 58 out.writeUTF(pojo.stuff); 59 } 60 61 62 } 63 | Popular Tags |