1 22 package org.jboss.test.aop.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 37 private static final long serialVersionUID = 1L; 38 public static boolean read = false; 39 public static boolean write = false; 40 41 NoInterfacesPOJO pojo; 42 43 public ExternalizableMixin(NoInterfacesPOJO pojo) 44 { 45 System.out.println("ExternalizableMixin constructor"); 46 this.pojo = pojo; 47 } 48 49 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException 50 { 51 System.out.println("ExternalizableMixin readExternal"); 52 read = true; 53 pojo.stuff = in.readUTF(); 54 } 55 56 public void writeExternal(ObjectOutput out) throws IOException 57 { 58 System.out.println("ExternalizableMixin writeExternal"); 59 write = true; 60 out.writeUTF(pojo.stuff); 61 } 62 63 64 } 65 | Popular Tags |